slitaz-boot-scripts view etc/init.d/rc.shutdown @ rev 20

Modified rc.shutdown(killall5) + typo
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 14 10:21:08 2008 +0100 (2008-01-14)
parents a052c0a3dd7f
children e122131b9ad6
line source
1 #!/bin/sh
2 # /etc/init.d/rc.shutdown - This script is used by /etc/inittab to stop
3 # all demons and shutdown the system.
4 #
5 . /etc/init.d/rc.functions
6 . /etc/rcS.conf
8 echo ""
9 echo "========"
10 echo ""
11 echo -e "\033[1m System is going down for reboot or halt.\033[0m"
12 echo ""
13 echo "========"
14 echo ""
16 # Stop all daemons started at boot time.
17 echo "Stoping all demons started at boot time..."
18 for daemon in $RUN_DAEMONS
19 do
20 if [ -x /etc/init.d/$daemon ]; then
21 /etc/init.d/$daemon stop
22 fi
23 done
25 # Sync all filesystems.
26 echo -n "Syncing all filesystems... "
27 sync
28 status && sleep 2
30 # Swap off.
31 echo -n "Disabling swap space... "
32 /sbin/swapoff -a
33 status && sleep 2
35 # Kill all processes.
36 echo -n "Killing all processes..."
37 killall5 && sleep 2
38 status
40 # Umount filesystems.
41 echo -n "Remonting rootfs read only..."
42 mount -o remount,ro /
43 status
44 echo "Unmounting all filesystems... "
45 /bin/umount -a