slitaz-boot-scripts rev 231 4.0

rc.shutdown: Shutdown much faster
author Christophe Lincoln <pankso@slitaz.org>
date Thu Feb 24 18:49:47 2011 +0100 (2011-02-24)
parents be7c1a2e97d7
children 9688dacef450
files etc/init.d/rc.shutdown
line diff
     1.1 --- a/etc/init.d/rc.shutdown	Thu Feb 24 18:48:18 2011 +0100
     1.2 +++ b/etc/init.d/rc.shutdown	Thu Feb 24 18:49:47 2011 +0100
     1.3 @@ -5,57 +5,34 @@
     1.4  . /etc/init.d/rc.functions
     1.5  . /etc/rcS.conf
     1.6  
     1.7 -clear && sleep 1
     1.8 +# Bold info message with uptime
     1.9 +clear && echo -e "\n
    1.10  
    1.11 -# Bold info message with uptime
    1.12 -echo ""
    1.13 -echo -e "
    1.14 -================================================================================
    1.15 +	\033[1mSystem is going down for reboot or halt.\033[0m
    1.16  
    1.17 -    \033[1mSystem is going down for reboot or halt.\033[0m
    1.18 -
    1.19 -    Uptime:`uptime`
    1.20 -
    1.21 -================================================================================"
    1.22 -echo ""
    1.23 +    Uptime:`uptime`\n"
    1.24  
    1.25  # Store last alsa settings.
    1.26  if [ -x /usr/sbin/alsactl ]; then
    1.27 -	echo -n "Storing alsa sound settings..."
    1.28  	alsactl store
    1.29 -	status
    1.30  fi
    1.31  
    1.32  # Stop all daemons started at boot time.
    1.33 -echo "Stopping all daemons started at boot time..."
    1.34  for daemon in $RUN_DAEMONS
    1.35  do
    1.36  	if [ -x /etc/init.d/$daemon ]; then
    1.37 -		/etc/init.d/$daemon stop
    1.38 +		/etc/init.d/$daemon stop > /dev/null
    1.39  	fi
    1.40  done
    1.41  
    1.42  # Sync all filesystems.
    1.43 -echo -n "Syncing all filesystems... "
    1.44  sync
    1.45 -status && sleep 1
    1.46  
    1.47  # Swap off.
    1.48 -echo -n "Disabling swap space... "
    1.49  /sbin/swapoff -a
    1.50 -status
    1.51  
    1.52  # Kill all processes.
    1.53 -echo "Killing all processes..."
    1.54  killall5
    1.55  
    1.56  # Umount filesystems.
    1.57 -echo -n "Remounting rootfs read only..."
    1.58 -mount -o remount,ro /
    1.59 -status
    1.60 -echo "Unmounting all filesystems... "
    1.61 -/bin/umount -a -r
    1.62 -
    1.63 -echo ""
    1.64 -usleep_progress
    1.65 -echo ""
    1.66 +/bin/umount -a -r 2>/dev/null