Revision 1108,
652 bytes
checked in by daisuke, 14 years ago
(diff) |
import initscripts-8.90.6 from internal cvs repository
|
Line | |
---|
1 | #! /bin/bash |
---|
2 | |
---|
3 | # Bring down all unneeded services that are still running (there shouldn't |
---|
4 | # be any, so this is just a sanity check) |
---|
5 | |
---|
6 | case "$1" in |
---|
7 | *start) |
---|
8 | ;; |
---|
9 | *) |
---|
10 | echo $"Usage: $0 {start}" |
---|
11 | exit 1 |
---|
12 | ;; |
---|
13 | esac |
---|
14 | |
---|
15 | |
---|
16 | for i in /var/lock/subsys/* ; do |
---|
17 | # Check if the script is there. |
---|
18 | [ -f "$i" ] || continue |
---|
19 | |
---|
20 | # Get the subsystem name. |
---|
21 | subsys=${i#/var/lock/subsys/} |
---|
22 | |
---|
23 | # Networking could be needed for NFS root. |
---|
24 | [ $subsys = network ] && continue |
---|
25 | |
---|
26 | # Bring the subsystem down. |
---|
27 | if [ -f /etc/init.d/$subsys.init ]; then |
---|
28 | /etc/init.d/$subsys.init stop |
---|
29 | elif [ -f /etc/init.d/$subsys ]; then |
---|
30 | /etc/init.d/$subsys stop |
---|
31 | else |
---|
32 | rm -f "$i" |
---|
33 | fi |
---|
34 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.