mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-01 15:52:55 +02:00
Move all initscripts for the system to src/initscripts/system
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
This commit is contained in:
42
src/initscripts/system/halt
Normal file
42
src/initscripts/system/halt
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin $rc_base/init.d/halt
|
||||
#
|
||||
# Description : Halt Script
|
||||
#
|
||||
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
#
|
||||
# Version : 00.00
|
||||
#
|
||||
# Notes :
|
||||
#
|
||||
########################################################################
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
case "${1}" in
|
||||
stop)
|
||||
sync && sync
|
||||
boot_mesg "Remount root readonly..."
|
||||
mount -f -o remount,ro / > /dev/null 2>&1
|
||||
evaluate_retval
|
||||
|
||||
boot_mesg "Prepare for halt..."
|
||||
sleep 2
|
||||
|
||||
#Disable all leds at shutdown
|
||||
for led in $(ls /sys/class/leds); do
|
||||
echo "none" > /sys/class/leds/$led/trigger
|
||||
echo "0" > /sys/class/leds/$led/brightness
|
||||
done
|
||||
|
||||
halt -d -f -i -p
|
||||
;;
|
||||
*)
|
||||
echo "Usage: {stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/halt
|
||||
Reference in New Issue
Block a user