43 lines
640 B
Plaintext
43 lines
640 B
Plaintext
|
#!/bin/ash
|
||
|
|
||
|
# System Shutdown Script
|
||
|
#
|
||
|
|
||
|
. /etc/rc.d/init.d/functions
|
||
|
|
||
|
echo "[ /\ ] Stopping Everest Linux"
|
||
|
|
||
|
echo
|
||
|
echo "System is going down for reboot or halt now."
|
||
|
echo
|
||
|
|
||
|
|
||
|
echo "Starting stop scripts."
|
||
|
|
||
|
for i in /etc/rc.d/stop/*
|
||
|
do
|
||
|
if [ -x $i ]; then
|
||
|
$i stop
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
if [ -x /sbin/hwclock ] && [ -e /dev/rtc0 ]; then
|
||
|
echo -n "Syncing system clock to hardware clock: "
|
||
|
hwclock --systohc --utc
|
||
|
check_status
|
||
|
fi
|
||
|
|
||
|
if [ -x /sbin/swapoff ] && [ -s /etc/fstab ]; then
|
||
|
echo -n "Disabling swap space: "
|
||
|
swapoff -a
|
||
|
check_status
|
||
|
fi
|
||
|
|
||
|
echo -n "Syncing all filesystems: "
|
||
|
sync
|
||
|
check_status
|
||
|
|
||
|
echo -n "Unmounting all filesystems: "
|
||
|
umount -a -r
|
||
|
|