slitaz-boot-scripts view etc/init.d/rc.shutdown @ rev 232
Added tag 4.0 for changeset 1aca016619c0
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Feb 24 19:19:05 2011 +0100 (2011-02-24) |
parents | 106fc03e782e |
children | f922801566b2 |
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 # Bold info message with uptime
9 clear && echo -e "\n
11 \033[1mSystem is going down for reboot or halt.\033[0m
13 Uptime:`uptime`\n"
15 # Store last alsa settings.
16 if [ -x /usr/sbin/alsactl ]; then
17 alsactl store
18 fi
20 # Stop all daemons 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 > /dev/null
25 fi
26 done
28 # Sync all filesystems.
29 sync
31 # Swap off.
32 /sbin/swapoff -a
34 # Kill all processes.
35 killall5
37 # Umount filesystems.
38 /bin/umount -a -r 2>/dev/null