Files
initscripts/SRC/initscripts/init.d/halt
Jay Larson 7de71fa1cd The following changes were made:
* Add URL
  * Removed /etc/rcX.d directories (should be provided by sysvinit)
  * Added 'service' script
  * Properly set VERBOSE and FSCKFIX in init.d/checkfs
  * Used = in favor of == in checkfs, halt and sendsignals
  * Removed ZFS from mountfs
2018-04-10 11:25:20 -05:00

40 lines
640 B
Bash
Executable File

#!/bin/sh
### BEGIN INIT INFO
# Provides: halt
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop: 0
# Short-Description: Halt the system
# X-Required: true
### END INIT INFO
. /lib/lsb/init-functions
[ -r /etc/default/halt ] && . /etc/default/halt
case "$1" in
stop)
poweroff='-p'
netdown='-i'
if [ "$HALT" = "halt" ]; then
poweroff=''
fi
if [ "$NETDOWN" = "no" ]; then
netdown=''
fi
log_init_msg "Halting system"
halt -d -f $netdown $poweroff
;;
*)
echo "Usage: [stop]"
exit 1
;;
esac
exit 0