[oe-commits] [openembedded-core] 07/14: watchdog: fix service PIDFile in do_install_append

git at git.openembedded.org git at git.openembedded.org
Mon Oct 7 22:09:59 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit e6f94aec2339dfaa644cae6eeb06c56892024af8
Author: Trevor Gamblin <trevor.gamblin at windriver.com>
AuthorDate: Wed Oct 2 14:28:24 2019 -0400

    watchdog: fix service PIDFile in do_install_append
    
    systemd requests an update to the unit file for watchdog.service
    due to the contents of PIDFile:
    
      systemd[1]: /usr/lib/systemd/system/watchdog.service:11: PIDFile=
        references a path below legacy directory /var/run/, updating
        /var/run/watchdog.pid → /run/watchdog.pid; please update the
        unit file accordingly.
    
    Use sed in do_install_append to fix the path from
    /var/run/watchdog.pid to /run/watchdog.pid. This change is
    recommended in services with the "forking" type (see commit
    a9353a5c5b in systemd source).
    
    Signed-off-by: Trevor Gamblin <trevor.gamblin at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-extended/watchdog/watchdog_5.15.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index 1acab2e..83a4ef2 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -51,8 +51,12 @@ do_install_append() {
 
 	install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog
 	install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
+    
+    # watchdog is of type "forking", so fix PIDFile to avoid warnings from
+    # systemd
+    sed -i 's@/var/run@/run at g' ${D}${systemd_system_unitdir}/watchdog.service
 
-	# watchdog.conf is provided by the watchdog-config recipe
+    # watchdog.conf is provided by the watchdog-config recipe
 	rm ${D}${sysconfdir}/watchdog.conf
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list