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

/etc/init.d/bootopts.sh: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 29 21:12:39 2015 +0200 (2015-08-29)
parents 7d4703882980
children
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/log/slitaz/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; do
21 if [ -x /etc/init.d/$daemon ]; then
22 /etc/init.d/$daemon stop >> $log
23 fi
24 done
26 # Sync all filesystems.
27 sync
29 # Swap off.
30 /sbin/swapoff -a
32 # Kill all processes.
33 killall5
35 # Umount filesystems
36 /bin/umount -a -r 2>/dev/null