[OE-core] [PATCH] systemd: Reload configuration on package install

Linus Wallgren linus.wallgren at scypho.com
Fri Oct 28 14:36:27 UTC 2016


When a systemd service file has changed it is required to reload
systemd's configuration. Otherwise changes to a service file will not be
picked up during package upgrade.
---
 meta/classes/systemd.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index d56c760..7e51ed6 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -29,6 +29,10 @@ if [ -n "$D" ]; then
 fi
 
 if type systemctl >/dev/null 2>/dev/null; then
+	if [ -z "$D" ]; then
+		systemctl daemon-reload
+	fi
+
 	systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
 
 	if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
-- 
2.9.3




More information about the Openembedded-core mailing list