Subject: Re: custom shutdown scripts, /usr/pkg/etc/rc.d
To: None <netbsd-users@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 03/19/2004 13:17:02
On Fri, 19 Mar 2004, Hanspeter Roth wrote:

> what is the best means to run additional custom shutdown scripts?
> Should one edit /etc/rc.shutdown?
> How is the 'stop' call best be launched on /usr/pkg/etc/rc.d/*?

Have look at /etc/rc.shutdown for:

files=$(rcorder -k shutdown ${rcshutdown_rcorder_flags} /etc/rc.d/*)

for _rc_elem in $(reverse_list $files); do
        run_rc_script $_rc_elem stop
done


So this means that the scripts that have the "shutdown" rcorder keyword
will be used, for example:
/etc/rc.d/swap1
/etc/rc.d/altqd
/etc/rc.d/local
/etc/rc.d/xdm
/etc/rc.d/ipfs
/etc/rc.d/inetd
/etc/rc.d/downinterfaces
/etc/rc.d/cron

Maybe add "/usr/pkg/etc/rc.d/*" to your rcshutdown_rcorder_flags (in
/etc/rc.conf). For example, this could add
/usr/pkg/etc/rc.d/apache to the above list.

   Jeremy C. Reed
   http://www.reedmedia.net/