[Mageia-dev] How should an init script determine if it is being run during install or regular boot?
mageia at blino.org
Wed Apr 27 14:11:42 CEST 2011
Michael scherer <misc at zarb.org> writes:
>> While I can submit a new patch that checks to see
>> if /var/lib/named or /mnt/var/lib/named exists, to
>> determine if the script is running in an install or
>> a normal bootup, I'm wondering if there is a "standard"
>> way for an init script to determine which environment
>> it's being run in.
> There is likely some heuristics based on env vars, but nothing
> I can think of right now ( and that doesn't seems very good to
> react differently during installation or not ).
You can use the following:
if [ -z "$DURING_INSTALL" ]; then
Olivier Blin - blino
More information about the Mageia-dev