]> git.pld-linux.org Git - projects/rc-scripts.git/blame - rc.d/init.d/single
Initial revision
[projects/rc-scripts.git] / rc.d / init.d / single
CommitLineData
7742e157
AF
1#!/bin/bash
2#
3#
4# rc.single This file is executed by init when it goes into runlevel
5# 1, which is the administrative state. It kills all
6# deamons and then puts the system into single user mode.
7# Note that the file systems are kept mounted.
8#
9# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
10# Modified for RHS Linux by Damien Neil
11#
12
13# Set the path.
14PATH=/sbin:/bin:/usr/sbin:/usr/bin
15
16# Kill all processes.
17[ "${BASH+bash}" = bash ] && enable kill
18
19echo "Sending all processes the TERM signal..."
20kill -15 -1
21sleep 5
22echo "Sending all processes the KILL signal.."
23kill -9 -1
24
25rm -f /var/lock/subsys/*
26
27# this looks nices
28[ -x /usr/bin/clear ] && /usr/bin/clear
29
30# Now go to the single user level.
31echo "Telling INIT to go to single user mode."
32exec init -t1 S
This page took 0.058375 seconds and 4 git commands to generate.