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

Re: chkconfig for Debian

>> Petter Reinholdtsen <petter.reinholdtsen@usit.uio.no> writes:

 > (and of course, it is available on RedHat, Irix and probably a few
 > others, making it a candidate for sysadm tool standardization.)

 The IRIX version does a quite different (and much more sensible) thing.

 $ /sbin/chkconfig verbose ; echo $?
 $ /sbin/chkconfig xntpd ; echo $?

 IRIX's "registry" is /etc/config/

 $ cat /etc/config/xntpd
 $ cat /etc/config/verbose

 It's quite simplistic.  /etc/rc2.d/NNxntpd links to /etc/init.d/xntpd,
 which uses chkconfig to check if it should start or not.  IOW, the
 links in /etc/rcN.d determine the runlevels, the contents of
 /etc/config/flag determine if the service should actually start or not.

 Something like:


    if [ $action = start ] && ! chkconfig service ; then
        exit 0

 bonus points for:

    if [ $force != yes ] ; then
        if [ $action = start ] && ! chkconfig service ; then
            exit 0

 that is, allow for '/etc/init.d/myservice start' to work even if the
 configuration says it shouldn't, e.g., '/etc/init.d/myservice --force

 This merges nicely with that whereami|guessnet|netenv thread.

Marcelo             | This signature was automatically generated with
mmagallo@debian.org | Signify v1.07.  For this and other cool products,
                    | check out http://www.debian.org/

Reply to: