]>
Commit | Line | Data |
---|---|---|
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. | |
14 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
15 | ||
16 | # Kill all processes. | |
17 | [ "${BASH+bash}" = bash ] && enable kill | |
18 | ||
19 | echo "Sending all processes the TERM signal..." | |
20 | kill -15 -1 | |
21 | sleep 5 | |
22 | echo "Sending all processes the KILL signal.." | |
23 | kill -9 -1 | |
24 | ||
25 | rm -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. | |
31 | echo "Telling INIT to go to single user mode." | |
32 | exec init -t1 S |