* 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
40 lines
640 B
Bash
Executable File
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
|