summaryrefslogtreecommitdiffstats
path: root/meta/classes/systemd.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-04-09 16:48:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-09 18:09:14 +0100
commitf6ae87e838685bd28c44512b3fd97bc5ad8127a7 (patch)
tree18b052dcbbd4fab7789d8d49061e989546c08208 /meta/classes/systemd.bbclass
parentb49ddeb11c0319b7ece278fd7cef6b0223114ca9 (diff)
downloadpoky-f6ae87e838685bd28c44512b3fd97bc5ad8127a7.tar.gz
systemd.bbclass: restart service in postinst, not start
When upgrading packages it's possible that the service is already running because opkg doesn't actually execute the prerm hooks on upgrades, which is where the service should be stopped. Handle this case by restarting in postinst instead of starting. If the service isn't already running then this doesn't make a difference, but if it is running then the service will be restarted. [ YOCTO #4213 ] (From OE-Core rev: 319ef0df4ae7ed0372eff90e11244123eccb023c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/systemd.bbclass')
-rw-r--r--meta/classes/systemd.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 69eeb9ef16..8084251f13 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -31,7 +31,7 @@ if type systemctl >/dev/null 2>/dev/null; then
31 systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} 31 systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
32 32
33 if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then 33 if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
34 systemctl start ${SYSTEMD_SERVICE} 34 systemctl restart ${SYSTEMD_SERVICE}
35 fi 35 fi
36fi 36fi
37} 37}