<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>On 10/2/19 2:28 PM, Trevor Gamblin wrote:<br>
</p>
<blockquote type="cite"
cite="mid:20191002182824.38571-1-Trevor.Gamblin@windriver.com">
<pre class="moz-quote-pre" wrap="">From: Trevor Gamblin <a class="moz-txt-link-rfc2396E" href="mailto:trevor.gamblin@windriver.com"><trevor.gamblin@windriver.com></a>
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 <a class="moz-txt-link-rfc2396E" href="mailto:trevor.gamblin@windriver.com"><trevor.gamblin@windriver.com></a>
---
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 1acab2e9e7..83a4ef27cf 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@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
}
</pre>
</blockquote>
<p>There are other instances of this warning regarding unit files.
For example, during core-image-minimal boot for qemux86-64:</p>
<p><code>[ 3.845927] systemd[1]:
/lib/systemd/system/dbus.socket:5: ListenStream= references a
path below legacy directory /var/run/, updating
/var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket</code></p>
<p><br>
</p>
</body>
</html>