]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: Reload configuration on package install
authorLinus Wallgren <linus.wallgren@scypho.com>
Fri, 28 Oct 2016 14:36:27 +0000 (16:36 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Nov 2016 11:02:26 +0000 (11:02 +0000)
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/systemd.bbclass

index d56c760a1779b60c5180e99bbf6b679b8f0fcef4..7e51ed6718a44e4db4afaa7ec91c225fa9cbd46f 100644 (file)
@@ -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