[OE-core] [PATCH] watchdog: install wd_keepalive service file to its own package
Yi Zhao
yi.zhao at windriver.com
Fri Sep 29 00:27:55 UTC 2017
Move wd_keepalive.service from watchdog package to watchdog-keepalive
package. Also remove debian specific code from the service file.
Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
---
meta/recipes-extended/watchdog/watchdog_5.15.bb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index 3d0b72e..5246b84 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -36,12 +36,17 @@ 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"
+SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
+SYSTEMD_SERVICE_${PN} = "watchdog.service"
+SYSTEMD_SERVICE_${PN}-keepalive = "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}
+ # remove specific code for debian
+ sed -i -e '/^ExecStartPost/d' \
+ -e '/^ExecStopPost/d' ${D}${systemd_system_unitdir}/wd_keepalive.service
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
@@ -54,6 +59,7 @@ PACKAGES =+ "${PN}-keepalive"
FILES_${PN}-keepalive = " \
${sysconfdir}/init.d/wd_keepalive \
+ ${systemd_system_unitdir}/wd_keepalive.service \
${sbindir}/wd_keepalive \
"
--
2.7.4
More information about the Openembedded-core
mailing list