summaryrefslogtreecommitdiffstats
path: root/meta/classes/systemd.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/systemd.bbclass')
-rw-r--r--meta/classes/systemd.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index efc1adcacb..2bd63a405b 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -38,12 +38,18 @@ fi
38} 38}
39 39
40systemd_prerm() { 40systemd_prerm() {
41OPTS=""
42
43if [ -n "$D" ]; then
44 OPTS="--root=$D"
45fi
46
41if type systemctl >/dev/null 2>/dev/null; then 47if type systemctl >/dev/null 2>/dev/null; then
42 if [ -z "$D" ]; then 48 if [ -z "$D" ]; then
43 systemctl stop ${SYSTEMD_SERVICE} 49 systemctl stop ${SYSTEMD_SERVICE}
44 fi 50 fi
45 51
46 systemctl disable ${SYSTEMD_SERVICE} 52 systemctl $OPTS disable ${SYSTEMD_SERVICE}
47fi 53fi
48} 54}
49 55