aboutsummaryrefslogtreecommitdiff
path: root/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-03-06 02:03:53 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-03-06 02:03:53 +0000
commit52a3537b8ebca3a5146cf363ffa6d716f2b00da0 (patch)
treeba684cac72fd8e2147f13d7c27d5a61d6133a444 /branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0
parentf93c3531707ac292b2d43f00c9a600d1ecdbb76d (diff)
downloadsimplepkg-52a3537b8ebca3a5146cf363ffa6d716f2b00da0.tar.gz
simplepkg-52a3537b8ebca3a5146cf363ffa6d716f2b00da0.tar.bz2
removing old 0.6 branch
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@798 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0')
-rwxr-xr-xbranches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0110
1 files changed, 0 insertions, 110 deletions
diff --git a/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0 b/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0
deleted file mode 100755
index bfec90a..0000000
--- a/branches/0.6/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0
+++ /dev/null
@@ -1,110 +0,0 @@
-#! /bin/sh
-#
-# rc.6 This file is executed by init when it goes into runlevel
-# 0 (halt) or runlevel 6 (reboot). It kills all processes,
-# unmounts file systems and then either halts or reboots.
-#
-# Version: @(#)/etc/rc.d/rc.6 2.47 Sat Jan 13 13:37:26 PST 2001
-#
-# Author: Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
-# Modified by: Patrick J. Volkerding, <volkerdi@slackware.com>
-#
-
-# Set the path.
-PATH=/sbin:/etc:/bin:/usr/bin
-
-# If there are SystemV init scripts for this runlevel, run them.
-if [ -x /etc/rc.d/rc.sysvinit ]; then
- . /etc/rc.d/rc.sysvinit
-fi
-
-# Set linefeed mode to avoid staircase effect.
-stty onlcr
-
-echo "Running shutdown script $0:"
-
-# Find out how we were called.
-case "$0" in
- *0)
- command="halt"
- ;;
- *6)
- command=reboot
- ;;
- *)
- echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
- exit 1
- ;;
-esac
-
-# Stop the Apache web server:
-if [ -x /etc/rc.d/rc.httpd ]; then
- /etc/rc.d/rc.httpd stop
-fi
-
-# Stop the MySQL database:
-if [ -r /var/run/mysql/mysql.pid ]; then
- . /etc/rc.d/rc.mysqld stop
-fi
-
-# Stop the Samba server:
-if [ -x /etc/rc.d/rc.samba ]; then
- . /etc/rc.d/rc.samba stop
-fi
-
-# Try to kill dhcpcd so the DHCP leases can be returned:
-killall -15 dhcpcd 1> /dev/null 2> /dev/null
-
-# Try to shut down pppd:
-PS="$(ps ax)"
-if echo "$PS" | grep -q -w pppd ; then
- if [ -x /usr/sbin/ppp-off ]; then
- /usr/sbin/ppp-off
- fi
-fi
-
-# Turn off process accounting:
-if [ -x /sbin/accton -a -r /var/log/pacct ]; then
- echo "Turning off process accounting."
- /sbin/accton
-fi
-
-# Kill all processes.
-# INIT is supposed to handle this entirely now, but this didn't always
-# work correctly without this second pass at killing off the processes.
-# Since INIT already notified the user that processes were being killed,
-# we'll avoid echoing this info this time around.
-if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
- killall5 -15
- sleep 5
- killall5 -9
-fi
-
-# Carry a random seed between reboots.
-echo "Saving random seed from /dev/urandom in /etc/random-seed."
-# Use the pool size from /proc, or 512 bytes:
-if [ -r /proc/sys/kernel/random/poolsize ]; then
- dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(cat /proc/sys/kernel/random/poolsize) 2> /dev/null
-else
- dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
-fi
-chmod 600 /etc/random-seed
-
-# Before unmounting file systems write a reboot or halt record to wtmp.
-$command -w
-
-# Clear /var/lock/subsys.
-if [ -d /var/lock/subsys ]; then
- rm -f /var/lock/subsys/*
-fi
-
-# This never hurts:
-sync
-
-# sleep 1 fixes problems with some hard drives that don't
-# otherwise finish syncing before reboot or poweroff
-sleep 1
-
-# This is to ensure all processes have completed on SMP machines:
-wait
-