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

Start Rpi GPIO + leds CGI plugin and improve tazberry
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 13 05:24:04 2014 +0200 (2014-04-13)
parents bfdc7cc1c657
children a02d52c27190
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 clear
12 boldify "System is going down for reboot or halt..."
13 newline
14 colorize 32 $(uptime)
15 newline
17 # Stop all daemons started at boot time
18 if [ "$RUN_DAEMONS" ]; then
19 colorize 33 "Stopping all daemons..."
20 for daemon in $RUN_DAEMONS; do
21 /etc/init.d/$daemon stop
22 done
23 fi
25 # Sync all filesystems
26 sync
28 # Swap off
29 /sbin/swapoff -a
31 # Kill all processes
32 killall5
34 # Umount filesystems
35 /bin/umount -a -r 2>/dev/null