blob: ee82f2179b3abb0fd5e862facc9d5669f9deef7c (
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
|
#!/bin/bash
# Bring down all unneeded services that are still running (there shouldn't
# be any, so this is just a sanity check)
RETVAL=0
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/}
# Bring the subsystem down.
if [ -f /etc/rc.d/init.d/$subsys.init ]; then
/etc/rc.d/init.d/$subsys.init stop
else
/etc/rc.d/init.d/$subsys stop
else
echo Warning: Could not stop \"$subsys\" \(no init script\).
RETVAL=1
fi
done
exit $RETVAL
|