blob: 574f4f6f052b8d447cea855b2901d399e2d69ae6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#! /bin/bash
# Bring down all unneeded services that are still running (there shouldn't
# be any, so this is just a sanity check)
case "$1" in
*start)
;;
*)
gprintf "Usage: %s {start}\n" $0
exit 1
;;
esac
for i in /var/lock/subsys/* ; do
# Check if the script is there.
[ -f "$i" ] || continue
# Get the subsystem name.
subsys=${i#/var/lock/subsys/}
# Networking could be needed for NFS root.
[ $subsys = network ] && continue
# Bring the subsystem down.
if [ -f /etc/init.d/$subsys ]; then
/etc/init.d/$subsys stop
elif [ -f /etc/init.d/$subsys.init ]; then
/etc/init.d/$subsys.init stop
else
rm -f "$i"
fi
done
exit 0
|