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

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

Revision 1.11, Thu Mar 17 16:43:51 2011 UTC (13 years, 2 months ago) by robert
Branch: MAIN
Changes since 1.10: +2 -2 lines

- introduce the INRC environment variable so that rc.subr(8) knows if it
  gets called from rc.local or rc.shutdown
- notify the user if a given operation was successfull or not by appending
  the (ok) or (failed) strings to the end of the daemon name
- hide stdout and stdin unless RC_DEBUG=1 is set, otherwise all the function
  names will be printed out and all output sent to stdin or stdout
- since from now on rc.subr is taking care of printing out the daemon names
  on startup, we don't need to do this from rc.{local,shutdown} anymore

brainkilling work done by me and ajacoutot@, ok ajacoutot@

#	$OpenBSD: rc.shutdown,v 1.11 2011/03/17 16:43:51 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
done

# Add your local shutdown actions here.

echo '.'