slitaz-boot-scripts diff etc/init.d/rc.shutdown @ rev 299
No more locale/keymap config at boot! Use syslinux menu. and fix opt wm=
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 17 15:56:40 2012 +0200 (2012-04-17) |
parents | |
children | 175315b7699d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/etc/init.d/rc.shutdown Tue Apr 17 15:56:40 2012 +0200 1.3 @@ -0,0 +1,37 @@ 1.4 +#!/bin/sh 1.5 +# /etc/init.d/rc.shutdown - This script is used by /etc/inittab to stop 1.6 +# all daemons and shutdown the system. 1.7 +# 1.8 +. /etc/init.d/rc.functions 1.9 +. /etc/rcS.conf 1.10 + 1.11 +log=/var/lib/shutdown.log 1.12 + 1.13 +# Bold info message with uptime 1.14 +clear && echo "System is going down for reboot or halt." > $log 1.15 +uptime >> $log 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 +for daemon in $RUN_DAEMONS 1.24 +do 1.25 + if [ -x /etc/init.d/$daemon ]; then 1.26 + /etc/init.d/$daemon stop >> $log 1.27 + fi 1.28 +done 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