blob: c888bce71b7f9545ed00e99d6b2bfa510f71585e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] How should an init script determine if it is being run during install or regular boot?
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20How%20should%20an%20init%20script%20determine%20if%20it%20is%20being%0A%09run%20during%20install%20or%20regular%20boot%3F&In-Reply-To=%3Cm3d3k7x5a9.fsf%40euphor.blino.org%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="004210.html">
<LINK REL="Next" HREF="004209.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] How should an init script determine if it is being run during install or regular boot?</H1>
<B>Olivier Blin</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20How%20should%20an%20init%20script%20determine%20if%20it%20is%20being%0A%09run%20during%20install%20or%20regular%20boot%3F&In-Reply-To=%3Cm3d3k7x5a9.fsf%40euphor.blino.org%3E"
TITLE="[Mageia-dev] How should an init script determine if it is being run during install or regular boot?">mageia at blino.org
</A><BR>
<I>Wed Apr 27 14:11:42 CEST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="004210.html">[Mageia-dev] Freeze push request: bluez
</A></li>
<LI>Next message: <A HREF="004209.html">[Mageia-dev] Freeze push request: kdepim4-runtime
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4208">[ date ]</a>
<a href="thread.html#4208">[ thread ]</a>
<a href="subject.html#4208">[ subject ]</a>
<a href="author.html#4208">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Michael scherer <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">misc at zarb.org</A>> writes:
>><i> While I can submit a new patch that checks to see
</I>>><i> if /var/lib/named or /mnt/var/lib/named exists, to
</I>>><i> determine if the script is running in an install or
</I>>><i> a normal bootup, I'm wondering if there is a "standard"
</I>>><i> way for an init script to determine which environment
</I>>><i> it's being run in.
</I>><i>
</I>><i> There is likely some heuristics based on env vars, but nothing
</I>><i> I can think of right now ( and that doesn't seems very good to
</I>><i> react differently during installation or not ).
</I>
You can use the following:
if [ -z "$DURING_INSTALL" ]; then
...
else
...
fi
--
Olivier Blin - blino
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="004210.html">[Mageia-dev] Freeze push request: bluez
</A></li>
<LI>Next message: <A HREF="004209.html">[Mageia-dev] Freeze push request: kdepim4-runtime
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4208">[ date ]</a>
<a href="thread.html#4208">[ thread ]</a>
<a href="subject.html#4208">[ subject ]</a>
<a href="author.html#4208">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|