blob: 4e11f32e8486f0c424cd2d254b0bb917f10b8959 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/sh
# LSB compliant init functions
# source standard Mandrake init functions
. /etc/init.d/functions
start_daemon() {
# Start daemons.
local force= nicelevel=
while [ "$1" != "${1##[-+]}" ]; do
case $1 in
-f)
force="--force"
shift
;;
-n)
nicelevel=$2
shift 2
;;
esac
done
if [ -z "$1" ]; then
gprintf "%s: Usage: start_daemon [-f] [-n nicelevel] {program} [args]\n" $0
return 1
fi
gprintf "Starting %s: " $1
daemon $force $nicelevel $*
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
touch /var/lock/subsys/$1
fi
echo
return $RETVAL
}
# killproc is handled by the normal init.d/functions
# pidofproc is handled by the normal init.d/functions
log_success_msg() {
success
}
log_failure_msg() {
failure
}
log_warning_msg() {
echo_warning
}
|