rcNG shutdown

rihad rihad at mail.ru
Fri Jan 6 10:02:19 PST 2006


Hi. I can't seem to find the way FreeBSD deals with stopping the running 
rc.d services when shutting down/rebooting the machine. In Linux, for 
example, the shutdown command first switches to "runlevel" 0, triggering 
init to call the program for that event, which deals with shutting down 
the running services gracefully. I might be missing something obvious: 
in FreeBSD, are users expected to write their own programs for doing 
that? Something along the lines of (untested):

find /usr/local/etc/rc.d/ /etc/rc.d/ -mindepth 2 -print0 \
	| xargs -0 -n1 -I% /usr/bin/command "%" stop
halt -p|reboot|whatever

?


More information about the freebsd-questions mailing list