From 415be16794dfe9122e6eedff950bede2070008ed Mon Sep 17 00:00:00 2001 From: Diego Rondini Date: Wed, 18 Mar 2015 16:50:45 +0100 Subject: 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. Signed-off-by: Diego Rondini Signed-off-by: Richard Purdie --- .../watchdog/watchdog/watchdog-conf.patch | 11 +++++ .../watchdog/watchdog/watchdog-init.patch | 53 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-init.patch (limited to 'meta/recipes-extended/watchdog/watchdog') 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 @@ +--- watchdog-5.13.orig/watchdog.conf 2013-02-01 12:15:44.000000000 +0100 ++++ watchdog-5.13/watchdog.conf 2014-11-13 10:59:43.233943000 +0100 +@@ -20,7 +20,7 @@ + #test-binary = + #test-timeout = + +-#watchdog-device = /dev/watchdog ++watchdog-device = /dev/watchdog + + # Defaults compiled into the binary + #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 @@ +--- 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 + + # 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 + } + -- cgit 1.2.3-korg