[BACK]Return to rc.shutdown CVS log [TXT][DIR] Up to [local] / src / etc

File: [local] / src / etc / Attic / rc.shutdown (download)

Revision 1.8, Tue Oct 26 20:56:03 2010 UTC (13 years, 7 months ago) by robert
Branch: MAIN
Changes since 1.7: +12 -4 lines

Add a simple 'rc' system to base in order to start/stop/restart/reload
services installed by the ports system (for now).
It only uses pgrep/pkill to handle these processes. A manual page will
come later.

'put it in' deraadt@

#	$OpenBSD: rc.shutdown,v 1.8 2010/10/26 20:56:03 robert Exp $
#
# If it exists, this script is run at system-shutdown by reboot(8),
# halt(8).  If the architecture supports keyboard requested halting,
# it is also run by init(8) when such an event happens.
#

powerdown=NO	# set to YES for powerdown

echo -n 'stopping local daemons:'

while [ -n "$rc_scripts" ]; do                                                       
	_r=${rc_scripts##* }
	rc_scripts=${rc_scripts%%*( )${_r}}
	[ -x /etc/rc.d/${_r} ] && /etc/rc.d/${_r} stop && echo -n " ${_r}"
done

# Add your local shutdown actions here.

echo '.'