diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-04 00:50:47 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-04 00:50:47 +0000 |
commit | fcfc2248b2cf6a611836d0635a875fb10f93d74a (patch) | |
tree | 5d1fc31ccfd1e7b0b367b5ae54c8336ac988007d /trunk/templates/vserver/vserver.d/etc/rc.d/rc.6 | |
parent | f9f16bb55714940883484f63b6daad9c279dd3ce (diff) | |
download | simplepkg-fcfc2248b2cf6a611836d0635a875fb10f93d74a.tar.gz simplepkg-fcfc2248b2cf6a611836d0635a875fb10f93d74a.tar.bz2 |
new 'compact' template format
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@634 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/templates/vserver/vserver.d/etc/rc.d/rc.6')
-rwxr-xr-x | trunk/templates/vserver/vserver.d/etc/rc.d/rc.6 | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/trunk/templates/vserver/vserver.d/etc/rc.d/rc.6 b/trunk/templates/vserver/vserver.d/etc/rc.d/rc.6 deleted file mode 100755 index bfec90a..0000000 --- a/trunk/templates/vserver/vserver.d/etc/rc.d/rc.6 +++ /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 - |