summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
blob: b2765f19081e85597218fbf07c6a1e52b2e13791 (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
53
54
55
56
Signed-off-by: Diego Rondini <diego.ml@zoho.com>
Upstream-Status: Inappropriate

--- watchdog-5.13.orig/redhat/watchdog.init	2014-11-12 17:18:39.125943000 +0100
+++ watchdog-5.13/redhat/watchdog.init	2014-11-12 18:27:36.189943000 +0100
@@ -7,7 +7,7 @@
 #                 Henning P. Schmiedehausen <hps@tanstaafl.de>
 
 # Source function library.
-. /etc/rc.d/init.d/functions
+. /etc/init.d/functions
 
 [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0
 
@@ -23,22 +23,22 @@
 
 start() {
 
-	echo -n $"Starting $prog: "
+	echo -n "Starting $prog: "
 	if [ -n "$(pidofproc $prog)" ]; then
-		echo -n $"$prog: already running"
-		echo_failure
+		echo -n "$prog: already running "
+		failure
 		echo
 		return 1
 	fi
 	if [ "$VERBOSE" = "yes" ]; then
-	    daemon /usr/sbin/${prog} -v
+	    /usr/sbin/${prog} -v
 	else
-	    daemon /usr/sbin/${prog}
+	    /usr/sbin/${prog}
         fi
 	RETVAL=$?
 	[ $RETVAL -eq 0 ] && touch $lockfile
-	[ $RETVAL -eq 0 ] && echo_success
-	[ $RETVAL -ne 0 ] && echo_failure
+	[ $RETVAL -eq 0 ] && success
+	[ $RETVAL -ne 0 ] && failure
 	echo
 	return $RETVAL
 }
@@ -50,8 +50,10 @@
 	# and reboot the box.
 	killproc $prog -TERM
 	RETVAL=$?
-	echo
 	[ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
+	[ $RETVAL -eq 0 ] && success
+	[ $RETVAL -ne 0 ] && failure
+	echo
 	return $RETVAL
 }