summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorDiego Rondini <diego.ml@zoho.com>2015-03-18 16:50:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-22 14:42:17 +0000
commit98487ccb5f10b20509c63238b677a3fd4674e9d0 (patch)
tree390d0930e62ab1141df61003884cde175b88b158 /meta/recipes-extended
parenta1cb3b016bd0fcdbd6e3297ce8839d4a41817d02 (diff)
downloadpoky-98487ccb5f10b20509c63238b677a3fd4674e9d0.tar.gz
watchdog: Provide and install initscript
Provide and install an initscript for the watchdog package. In particular: - watchdog-init.patch adapts redhat initscript to be compatibile with OpenEmbedded; - watchdog-conf.patch selects /dev/watchdog as default device; - changes to the recipe install and configure the initscript. (From OE-Core rev: 415be16794dfe9122e6eedff950bede2070008ed) Signed-off-by: Diego Rondini <diego.ml@zoho.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch11
-rw-r--r--meta/recipes-extended/watchdog/watchdog/watchdog-init.patch53
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.14.bb12
3 files changed, 75 insertions, 1 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
new file mode 100644
index 0000000000..36f2968f5a
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
@@ -0,0 +1,11 @@
1--- watchdog-5.13.orig/watchdog.conf 2013-02-01 12:15:44.000000000 +0100
2+++ watchdog-5.13/watchdog.conf 2014-11-13 10:59:43.233943000 +0100
3@@ -20,7 +20,7 @@
4 #test-binary =
5 #test-timeout =
6
7-#watchdog-device = /dev/watchdog
8+watchdog-device = /dev/watchdog
9
10 # Defaults compiled into the binary
11 #temperature-device =
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
new file mode 100644
index 0000000000..0fa8ee97cb
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
@@ -0,0 +1,53 @@
1--- watchdog-5.13.orig/redhat/watchdog.init 2014-11-12 17:18:39.125943000 +0100
2+++ watchdog-5.13/redhat/watchdog.init 2014-11-12 18:27:36.189943000 +0100
3@@ -7,7 +7,7 @@
4 # Henning P. Schmiedehausen <hps@tanstaafl.de>
5
6 # Source function library.
7-. /etc/rc.d/init.d/functions
8+. /etc/init.d/functions
9
10 [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0
11
12@@ -23,22 +23,22 @@
13
14 start() {
15
16- echo -n $"Starting $prog: "
17+ echo -n "Starting $prog: "
18 if [ -n "$(pidofproc $prog)" ]; then
19- echo -n $"$prog: already running"
20- echo_failure
21+ echo -n "$prog: already running "
22+ failure
23 echo
24 return 1
25 fi
26 if [ "$VERBOSE" = "yes" ]; then
27- daemon /usr/sbin/${prog} -v
28+ /usr/sbin/${prog} -v
29 else
30- daemon /usr/sbin/${prog}
31+ /usr/sbin/${prog}
32 fi
33 RETVAL=$?
34 [ $RETVAL -eq 0 ] && touch $lockfile
35- [ $RETVAL -eq 0 ] && echo_success
36- [ $RETVAL -ne 0 ] && echo_failure
37+ [ $RETVAL -eq 0 ] && success
38+ [ $RETVAL -ne 0 ] && failure
39 echo
40 return $RETVAL
41 }
42@@ -50,8 +50,10 @@
43 # and reboot the box.
44 killproc $prog -TERM
45 RETVAL=$?
46- echo
47 [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
48+ [ $RETVAL -eq 0 ] && success
49+ [ $RETVAL -ne 0 ] && failure
50+ echo
51 return $RETVAL
52 }
53
diff --git a/meta/recipes-extended/watchdog/watchdog_5.14.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb
index c77d91dcdd..9ec0a8e84a 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -10,11 +10,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
10 10
11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ 11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
12 file://fixsepbuild.patch \ 12 file://fixsepbuild.patch \
13 file://fix-ping-failure.patch" 13 file://fix-ping-failure.patch \
14 file://watchdog-init.patch \
15 file://watchdog-conf.patch"
14 16
15SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4" 17SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
16SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1" 18SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
17 19
18inherit autotools 20inherit autotools
21inherit update-rc.d
22
23INITSCRIPT_NAME = "watchdog.sh"
24INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
19 25
20RRECOMMENDS_${PN} = "kernel-module-softdog" 26RRECOMMENDS_${PN} = "kernel-module-softdog"
27
28do_install_append() {
29 install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
30}