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

let use mdev to create devices
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 29 23:51:57 2012 +0000 (2012-05-29)
parents efe1212fa6af
children 78abe0d7b64e
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 newline
12 boldify "System is going down for reboot or halt..."
13 colorize 32 $(uptime)
15 # Store last alsa settings
16 #if [ -x /usr/sbin/alsactl ]; then
17 #alsactl store
18 #fi
20 # Stop all daemons started at boot time
21 if [ "$RUN_DAEMONS" ]; then
22 colorize 33 "Stoping all daemons..."
23 for daemon in $RUN_DAEMONS; do
24 /etc/init.d/$daemon stop
25 done
26 fi
28 # Sync all filesystems
29 sync
31 # Swap off
32 /sbin/swapoff -a
34 # Kill all processes
35 killall5
37 # Umount filesystems
38 /bin/umount -a -r 2>/dev/null