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

network.sh: not all card have Tx-Power
author Christophe Lincoln <pankso@slitaz.org>
date Fri Feb 27 02:29:14 2009 +0100 (2009-02-27)
parents 87bb2aa0140a
children 7d89350f47ed
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 # Stop all daemons started at boot time.
23 echo "Stoping all demons started at boot time..."
24 for daemon in $RUN_DAEMONS
25 do
26 if [ -x /etc/init.d/$daemon ]; then
27 /etc/init.d/$daemon stop
28 fi
29 done
31 # Sync all filesystems.
32 echo -n "Syncing all filesystems... "
33 sync
34 status && sleep 2
36 # Swap off.
37 echo -n "Disabling swap space... "
38 /sbin/swapoff -a
39 status
41 # Kill all processes.
42 echo -n "Killing all processes..."
43 killall5 && sleep 2
44 status
46 # Umount filesystems.
47 echo -n "Remonting rootfs read only..."
48 mount -o remount,ro /
49 status
50 echo "Unmounting all filesystems... "
51 /bin/umount -a -r
53 echo ""
54 usleep_progress
55 echo ""