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.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index cca2152927..42fa554c12 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -10,11 +10,14 @@ SYSTEMD_AUTO_ENABLE ??= "enable"
10# even if the systemd DISTRO_FEATURE isn't enabled. As such don't make any 10# even if the systemd DISTRO_FEATURE isn't enabled. As such don't make any
11# changes directly but check the DISTRO_FEATURES first. 11# changes directly but check the DISTRO_FEATURES first.
12python __anonymous() { 12python __anonymous() {
13 if "systemd" in d.getVar("DISTRO_FEATURES", True).split(): 13 features = d.getVar("DISTRO_FEATURES", True).split()
14 # If the distro features have systemd but not sysvinit, inhibit update-rcd
15 # from doing any work so that pure-systemd images don't have redundant init
16 # files.
17 if "systemd" in features:
14 d.appendVar("DEPENDS", " systemd-systemctl-native") 18 d.appendVar("DEPENDS", " systemd-systemctl-native")
15 # Set a variable so that update-rcd.bbclass knows we're active and can 19 if "sysvinit" not in features:
16 # disable itself. 20 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
17 d.setVar("SYSTEMD_BBCLASS_ENABLED", "1")
18} 21}
19 22
20systemd_postinst() { 23systemd_postinst() {