40 lines
587 B
Bash
Executable File
40 lines
587 B
Bash
Executable File
#!/bin/ash
|
|
|
|
# System Shutdown Script
|
|
#
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
echo
|
|
echo "[ /\^ ] Stopping Everest Linux"
|
|
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
|
|
|