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.

(From OE-Core rev: 94efe6d1d7893e241bcf98eff80ac8d8fbf2e885)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Linus Wallgren 2016-10-28 16:36:27 +02:00 committed by Richard Purdie
parent 775e7a4904
commit 69a8784b79
1 changed files with 4 additions and 0 deletions

View 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