blob: 692414e302b1244445012618ac61168007c124fd (
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
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
waserror=0
function sd_action() {
MSG=$1
shift
#echo "ACTION: $*"
$* > /dev/null
rc=$?
if [ $rc -ne 0 ] ; then
sd_log_failure_msg $"$MSG"
else
sd_log_success_msg $"$MSG"
fi
return $rc
}
function sd_log_info_msg() {
einfo " $*"
}
function sd_log_warning_msg() {
ewarn " $*"
}
function sd_log_success_msg() {
einfo " $*"
eend 0
}
function sd_log_failure_msg() {
waserror=1
einfo " $*"
eend 1
}
function startproc() {
/sbin/start-stop-daemon --start -p $3 --exec $4 -- -p $3
}
function killproc() {
/sbin/start-stop-daemon --stop -p $3
}
|