summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-systemd/classes/systemd.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 8af0d58cf9..38b9ed5c03 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -1,5 +1,7 @@
1DEPENDS_append = " systemd-systemctl-native" 1DEPENDS_append = " systemd-systemctl-native"
2 2
3SYSTEMD_AUTO_ENABLE ??= "enable"
4
3systemd_postinst() { 5systemd_postinst() {
4OPTS="" 6OPTS=""
5 7
@@ -7,9 +9,9 @@ if [ -n "$D" ]; then
7 OPTS="--root=$D" 9 OPTS="--root=$D"
8fi 10fi
9 11
10systemctl $OPTS enable ${SYSTEMD_SERVICE} 12systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
11 13
12if [ -z "$D" ]; then 14if [ -z "$D" -a ${SYSTEMD_AUTO_ENABLE} = "enable" ]; then
13 systemctl start ${SYSTEMD_SERVICE} 15 systemctl start ${SYSTEMD_SERVICE}
14fi 16fi
15} 17}