[Mageia-dev] How should an init script determine if it is being run during install or regular boot?

Michael scherer misc at zarb.org
Mon Apr 25 23:30:08 CEST 2011

On Sun, Apr 24, 2011 at 01:38:46PM -0400, David W. Hodgins wrote:
> The patch submitted for the named init script in
> https://bugs.mageia.org/show_bug.cgi?id=871
> fixes the problem of the openssl engines not being
> available in the chroot environment, during a normal
> bootup, however during an upgrade using the beta 2
> pre-release iso's, it fails as the init script is
> using absolute path names.
> 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 ).

Michael Scherer

More information about the Mageia-dev mailing list