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

network.sh: better handle WEP connections, handle EAP, store Wi-Fi neworks by default; network.conf: migrate to extended format to support EAP arguments, and few more.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Mar 23 02:01:21 2015 +0200 (2015-03-23)
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