diff options
author | Kai Kang <kai.kang@windriver.com> | 2017-08-22 14:35:05 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-30 11:14:26 +0100 |
commit | c14550deb824b3ef8087dede22d664879e85006d (patch) | |
tree | c272f6a6d8de2b59bfe65b0ea7fbd24ee87585ba /meta | |
parent | e417dce911163f7a980e9e028058e600453e4cc8 (diff) | |
download | poky-c14550deb824b3ef8087dede22d664879e85006d.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
(From OE-Core rev: a30fcb95d527bc2a0981af5c1ed179a122bb055c)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog_5.15.bb | 15 |
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 | |||
21 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" | 21 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" |
22 | UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" | 22 | UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" |
23 | 23 | ||
24 | inherit autotools | 24 | inherit autotools update-rc.d systemd |
25 | inherit update-rc.d | ||
26 | 25 | ||
27 | DEPENDS_append_libc-musl = " libtirpc " | 26 | DEPENDS_append_libc-musl = " libtirpc " |
28 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " | 27 | 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 ." | |||
37 | INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" | 36 | INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" |
38 | INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." | 37 | INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." |
39 | 38 | ||
39 | SYSTEMD_SERVICE_${PN} = "watchdog.service wd_keepalive.service" | ||
40 | |||
40 | do_install_append() { | 41 | do_install_append() { |
42 | install -d ${D}${systemd_system_unitdir} | ||
43 | install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} | ||
44 | install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} | ||
45 | |||
41 | install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh | 46 | install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh |
42 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive | 47 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive |
43 | 48 | ||
44 | # watchdog.conf is provided by the watchdog-config recipe | 49 | # watchdog.conf is provided by the watchdog-config recipe |
45 | rm ${D}${sysconfdir}/watchdog.conf | 50 | rm ${D}${sysconfdir}/watchdog.conf |
46 | } | 51 | } |
47 | 52 | ||
48 | PACKAGES =+ "${PN}-keepalive" | 53 | PACKAGES =+ "${PN}-keepalive" |