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

Tiny typos
author Paul Issott <paul@slitaz.org>
date Mon Mar 09 20:04:05 2009 +0000 (2009-03-09)
parents 7d89350f47ed
children 106fc03e782e
line source
1 #!/bin/sh
2 # /etc/init.d/rc.shutdown - This script is used by /etc/inittab to stop
3 # all daemons and shutdown the system.
4 #
5 . /etc/init.d/rc.functions
6 . /etc/rcS.conf
8 clear && sleep 1
10 # Bold info message with uptime
11 echo ""
12 echo -e "
13 ================================================================================
15 \033[1mSystem is going down for reboot or halt.\033[0m
17 Uptime:`uptime`
19 ================================================================================"
20 echo ""
22 # Store last alsa settings.
23 if [ -x /usr/sbin/alsactl ]; then
24 echo -n "Storing alsa sound settings..."
25 alsactl store
26 status
27 fi
29 # Stop all daemons started at boot time.
30 echo "Stopping all daemons started at boot time..."
31 for daemon in $RUN_DAEMONS
32 do
33 if [ -x /etc/init.d/$daemon ]; then
34 /etc/init.d/$daemon stop
35 fi
36 done
38 # Sync all filesystems.
39 echo -n "Syncing all filesystems... "
40 sync
41 status && sleep 1
43 # Swap off.
44 echo -n "Disabling swap space... "
45 /sbin/swapoff -a
46 status
48 # Kill all processes.
49 echo -n "Killing all processes..."
50 killall5
52 # Umount filesystems.
53 echo -n "Remounting rootfs read only..."
54 mount -o remount,ro /
55 status
56 echo "Unmounting all filesystems... "
57 /bin/umount -a -r
59 echo ""
60 usleep_progress
61 echo ""