Subject: Re: admin script for ipfilter
To: Darren Reed <>
From: Hubert Feyrer <>
List: tech-userlevel
Date: 12/30/2006 01:05:14
On Fri, 29 Dec 2006, Darren Reed wrote:
> that functioned in a manner specific to rc.d.  Having a chkconfig
> in NetBSD that was similar but different will just lead to confusion
> when you have to use both NetBSD AND Linux.

True... you mean like the one in Linux that seems to obscure what I know 
from Irix?

Let me recap from what I know about the Irix one, so maybe you have an 
idea why I suggested it (see for some 

  * It can be used to show if services are disabled or enabled, without
    a need to know any paths:

       rfhsi8089% chkconfig
               Flag                 State
               ====                 =====

               array                off
               autoconfig_ipaddress off
               autofs               on
               automount            off
               cesag                off
               desktop              on
               dtlogin              off

  * It can do so for individual services, for scripting, again without
    bothering for any pathnames:

       rfhsi8089% chkconfig autofs
       rfhsi8089% echo $?
       rfhsi8089% chkconfig automount
       rfhsi8089% echo $?

  * The implementation is done in single files as you wanted:

       rfhsi8089% cat /etc/config/autofs
       rfhsi8089% cat /etc/config/automount

       rfhsi8089% cat /etc/init.d/network
                   # Start the NFS automounter daemon
                   if $IS_ON autofs && test -x $NFS/autofsd && \
                                       test -x $NFS/autofs; then
                       /sbin/killall -k 30 -TERM automount
                       /sbin/killall -k 10 -TERM autofs autofsd
                       AUTOFSD_OPTS="`cat $CONFIG/autofsd.options 2> /dev/null`"
                                                               $ECHO " autofsd\c"
                       AUTOFS_OPTS="`cat $CONFIG/autofs.options 2> /dev/null`"
                       $CSU CAP_MOUNT_MGT,CAP_MAC_READ+ip -c "$NFS/autofs $AUTOFS_OPTS" 2>&1 | while read l; do $LOGGER "autofs: %s\n" "$l"; done >/dev/null 2>&1
                    elif $IS_ON automount && test -x $NFS/automount ; then
                       /sbin/killall -k 30 -TERM automount
                       AUTOMOUNT_OPTS="`cat $CONFIG/automount.options 2> /dev/null`"
                       $NFS/automount $AUTOMOUNT_OPTS 2>&1 | \
                              while read l; do $LOGGER "automount: %s\n" "$l" ; done > /dev/null 2>&1
                                                                $ECHO " automount\c"

  * IIRC it can enable and disable services with the same tool ("chkconfig
    service on/off") but i can't test this right now.

I do not know what Linux added beyond that, but the above is what I had in 
mind, as answer to your list of requirements.

  - Hubert