[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

/lib/lsb/init-functions vs. /etc/init.d/functions in init scripts?

Folks are supposed to upgrade their init.d scripts to support LSB.

Some of this is covered here:


One aspect of that is to switch from sourcing /etc/init.d/functions to
sourcing /lib/lsb/init-functions.

However the two init function libraries do not export the same
functions, nor is one a proper subset of the other.

If one wants to use the same init script on different Fedora versions
and/or different RHEL versions is it safe to assume the lsb functions
will exist and be properly implemented? In what releases will a lsb
compliant init script run correctly?

Does one have to require redhat-lsb in your RPM spec file?

Are you supposed to do something like this so the lsb functions override
the init.d functions but the init.d function such as "status" are not

if test -f /lib/lsb/init-functions; then
    . /lib/lsb/init-functions
. /etc/init.d/functions

If so I guess you also have to test for the existence
of /lib/lsb/init-functions before you can know if you're going to call
"daemon" or "start_daemon", right? (yuck).

Am I missing a pointer to documentation where all this is explained?

Are the bugs opened against init scripts a red herring because this
stuff has not been figured out yet as alluded to on July 5th? If so
maybe my above questions need to be addressed in the wiki.

John Dennis <jdennis redhat com>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]