slitaz-arm diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/rootfs/etc/init.d/shutdown.sh Sat May 26 02:16:49 2012 +0200 1.3 @@ -0,0 +1,37 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# /etc/init.d/shutdown.sh: System shutdown or reboot script 1.7 +# 1.8 +# Copyright (C) 2012 SliTaz ARM - BSD License 1.9 +# 1.10 +. /lib/libtaz.sh 1.11 +. /etc/rcS.conf 1.12 + 1.13 +# Messages 1.14 +boldify "System is going down for reboot or halt..." 1.15 +colorize 32 $(uptime) 1.16 + 1.17 +# Store last alsa settings 1.18 +#if [ -x /usr/sbin/alsactl ]; then 1.19 + #alsactl store 1.20 +#fi 1.21 + 1.22 +# Stop all daemons started at boot time 1.23 +if [ "$RUN_DAEMONS" ]; then 1.24 + colorize 33 "Stoping all daemons..." 1.25 + for daemon in $RUN_DAEMONS; do 1.26 + /etc/init.d/$daemon stop 1.27 + done 1.28 +fi 1.29 + 1.30 +# Sync all filesystems 1.31 +sync 1.32 + 1.33 +# Swap off 1.34 +/sbin/swapoff -a 1.35 + 1.36 +# Kill all processes 1.37 +killall5 1.38 + 1.39 +# Umount filesystems 1.40 +/bin/umount -a -r 2>/dev/null