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

Small fix for system.sh and be less verbose on logout
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 17 15:10:21 2011 +0200 (2011-05-17)
parents 1aca016619c0
children
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 log=/var/lib/shutdown.log
10 # Bold info message with uptime
11 clear && echo "System is going down for reboot or halt." > $log
12 uptime >> $log
14 # Store last alsa settings.
15 if [ -x /usr/sbin/alsactl ]; then
16 alsactl store
17 fi
19 # Stop all daemons started at boot time.
20 for daemon in $RUN_DAEMONS
21 do
22 if [ -x /etc/init.d/$daemon ]; then
23 /etc/init.d/$daemon stop >> $log
24 fi
25 done
27 # Sync all filesystems.
28 sync
30 # Swap off.
31 /sbin/swapoff -a
33 # Kill all processes.
34 killall5
36 # Umount filesystems.
37 /bin/umount -a -r 2>/dev/null