slitaz-arm view rootfs/etc/init.d/shutdown.sh @ rev 13

Add custom rcS.conf, and shutdown, improve rcS
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 26 02:16:49 2012 +0200 (2012-05-26)
parents
children 5fc6d5fabb1c
line source
1 #!/bin/sh
2 #
3 # /etc/init.d/shutdown.sh: System shutdown or reboot script
4 #
5 # Copyright (C) 2012 SliTaz ARM - BSD License
6 #
7 . /lib/libtaz.sh
8 . /etc/rcS.conf
10 # Messages
11 boldify "System is going down for reboot or halt..."
12 colorize 32 $(uptime)
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 if [ "$RUN_DAEMONS" ]; then
21 colorize 33 "Stoping all daemons..."
22 for daemon in $RUN_DAEMONS; do
23 /etc/init.d/$daemon stop
24 done
25 fi
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