aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Wallgren <linus.wallgren@scypho.com>2016-10-28 16:36:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-23 11:02:26 +0000
commit94efe6d1d7893e241bcf98eff80ac8d8fbf2e885 (patch)
treeaa35f2e037ab36d97c1f08372bab6129b043bc94
parent364565f3f3baccc9757ce0dcb393464b38055b4f (diff)
downloadopenembedded-core-contrib-94efe6d1d7893e241bcf98eff80ac8d8fbf2e885.tar.gz
systemd: Reload configuration on package install
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>
-rw-r--r--meta/classes/systemd.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index d56c760a17..7e51ed6718 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