summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-02-28 16:28:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-26 22:42:37 +0000
commita3856ab19f1d4ae312f559521785ad4384700729 (patch)
tree6dc34e6fa0f12735608d443e912b5fc6a377d938 /meta
parentf5d018a769fa297efa629cbbf6e42a49173faa8b (diff)
downloadopenembedded-core-a3856ab19f1d4ae312f559521785ad4384700729.tar.gz
openembedded-core-a3856ab19f1d4ae312f559521785ad4384700729.tar.bz2
openembedded-core-a3856ab19f1d4ae312f559521785ad4384700729.zip
update-rcd.bbclass: handle both sysvinit and systemd features being present
Run the helper if the sysvinit feature is present, or if the systemd feature is present but the systemd class hasn't been inherited. We want to run in the latter case as systemd has sysvinit compatibility, but we don't want to always run so that pure systemd images don't have redundant sysvinit files. Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/update-rc.d.bbclass9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 65bf022e49..06b91c10ed 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -75,9 +75,12 @@ python populate_packages_updatercd () {
postrm += d.getVar('updatercd_postrm', True)
d.setVar('pkg_postrm_%s' % pkg, postrm)
- # If the systemd class has also been inherited, then don't do anything as
- # the systemd units will override anything created by update-rc.d.
- if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True):
+ # Run if the sysvinit feature is present, or if the systemd feature is present
+ # but the systemd class hasn't been inherited. We want to run in the latter case
+ # as systemd has sysvinit compatibility, but we don't want to always so that
+ # pure systemd images don't have redundent sysvinit files.
+ if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \
+ ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)):
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
if pkgs == None:
pkgs = d.getVar('UPDATERCPN', True)