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

Typo and modified shutdown screen output
author Christophe Lincoln <pankso@slitaz.org>
date Sat Feb 23 01:42:47 2008 +0100 (2008-02-23)
parents e122131b9ad6
children 2477245b229d
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 # Message with progress bar
9 echo -e "
10 ================================================================================
12 \033[1mSystem is going down for reboot or halt.\033[0m
14 Uptime:`uptime`
16 ================================================================================"
17 echo ""
19 # Stop all daemons started at boot time.
20 echo "Stoping all demons started at boot time..."
21 for daemon in $RUN_DAEMONS
22 do
23 if [ -x /etc/init.d/$daemon ]; then
24 /etc/init.d/$daemon stop
25 fi
26 done
28 # Sync all filesystems.
29 echo -n "Syncing all filesystems... "
30 sync
31 status && sleep 2
33 # Swap off.
34 echo -n "Disabling swap space... "
35 /sbin/swapoff -a
36 status
38 # Kill all processes.
39 echo -n "Killing all processes..."
40 killall5 && sleep 2
41 status
43 # Umount filesystems.
44 echo -n "Remonting rootfs read only..."
45 mount -o remount,ro /
46 status
47 echo "Unmounting all filesystems... "
48 /bin/umount -a -r
50 echo ""
51 usleep_progress
52 echo ""