slitaz-boot-scripts view etc/init.d/rc.shutdown @ rev 335
Added tag 5.3.2 for changeset 5195a3bc63bf
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 30 18:28:16 2013 +0100 (2013-10-30) |
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