Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jan 2006 22:02:17 +0400
From:      rihad <rihad@mail.ru>
To:        freebsd-questions@freebsd.org
Subject:   rcNG shutdown
Message-ID:  <43BEB0A9.1030101@mail.ru>

next in thread | raw e-mail | index | archive | help
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

?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43BEB0A9.1030101>