aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2017-08-22 14:35:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 12:23:04 +0100
commita30fcb95d527bc2a0981af5c1ed179a122bb055c (patch)
treee9e21485834648bb82b7ed8974da6f9d800ba1cc
parent1a7b843d575b290917d1e379c2ba106460988230 (diff)
downloadopenembedded-core-contrib-a30fcb95d527bc2a0981af5c1ed179a122bb055c.tar.gz
watchdog: enable systemd support
Inherit systemd.bbclass to enable systemd support for watchdog. And fix indentation of do_install_append() as well according to: https://www.openembedded.org/wiki/Styleguide#Format_Guidelines Signed-off-by: Kai Kang <kai.kang@windriver.com>
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.15.bb15
1 files changed, 10 insertions, 5 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index 9659f27df5..3d0b72e08d 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -21,8 +21,7 @@ SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
-inherit autotools
-inherit update-rc.d
+inherit autotools update-rc.d systemd
DEPENDS_append_libc-musl = " libtirpc "
CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
@@ -37,12 +36,18 @@ INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ."
INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ."
+SYSTEMD_SERVICE_${PN} = "watchdog.service wd_keepalive.service"
+
do_install_append() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir}
+
install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
- install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
+ install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
- # watchdog.conf is provided by the watchdog-config recipe
- rm ${D}${sysconfdir}/watchdog.conf
+ # watchdog.conf is provided by the watchdog-config recipe
+ rm ${D}${sysconfdir}/watchdog.conf
}
PACKAGES =+ "${PN}-keepalive"