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

Huge clean, colored rcS, faster, fix sound and other devices (used need a devtmpfs mounted on /dev) disabled logging for now
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jun 01 21:46:07 2012 +0200 (2012-06-01)
parents bf2f87edd87c
children 93758e8de78a
line source
1 #!/bin/sh
2 #
3 # /etc/init.d/rc.shutdown : Executed on system shutdown or reboot
4 #
5 . /etc/init.d/rc.functions
6 . /etc/rcS.conf
8 log=/var/lib/shutdown.log
10 # Clear and quiet shutdown
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 2>> $log
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