]> git.pld-linux.org Git - projects/rc-scripts.git/blame - rc.d/init.d/single
now synced. (one file was missed)
[projects/rc-scripts.git] / rc.d / init.d / single
CommitLineData
12de71be 1#!/bin/sh
7742e157 2#
12de71be 3# single Script for sedding up administrative/rescue shell.
7742e157 4#
12de71be 5# chkconfig: 1 00 00
6# description: This file is executed by init when it goes into runlevel \
7# 1, which is the administrative state. It kills all \
8# deamons and then puts the system into single user mode. \
9# Note that the file systems are kept mounted. \
7742e157
AF
10#
11# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
12de71be 12# Modified for PLD Linux by Grzegorz Stanislawski
7742e157
AF
13#
14
15# Set the path.
16PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
12de71be 18case "$1" in
19 stop*)
20 exit 0
21 ;;
22 start*)
7742e157 23# Kill all processes.
12de71be 24 [ "${BASH+bash}" = bash ] && enable kill
7742e157 25
12de71be 26 echo "Sending all processes the TERM signal..."
27 kill -15 -1
28 sleep 5
29 echo "Sending all processes the KILL signal.."
30 kill -9 -1
7742e157 31
12de71be 32 rm -f /var/lock/subsys/*
7742e157 33
12de71be 34 # this looks nices
35 [ -x /usr/bin/clear ] && /usr/bin/clear
7742e157 36
12de71be 37 ## we just killed kerneld :-(
38 #/etc/rc.d/init.d/kerneld start
39
40 # Now go to the single user level.
41 echo "Telling INIT to go to single user mode."
42 exec init -t1 S
43 ;;
44esac
This page took 0.133992 seconds and 4 git commands to generate.