diff options
author | Ross Burton <ross.burton@intel.com> | 2013-02-28 16:28:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-26 22:43:03 +0000 |
commit | 55ba8ea8636bd4401aaad3d3e3441872cc974596 (patch) | |
tree | 998389f614edb945b478ae21a741faf3f923342d /meta/classes/update-rc.d.bbclass | |
parent | e92dfa11577c0be9dcd88e0d9892cb9808a74505 (diff) | |
download | poky-55ba8ea8636bd4401aaad3d3e3441872cc974596.tar.gz |
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.
(From OE-Core rev: a3856ab19f1d4ae312f559521785ad4384700729)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 9 |
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 () { | |||
75 | postrm += d.getVar('updatercd_postrm', True) | 75 | postrm += d.getVar('updatercd_postrm', True) |
76 | d.setVar('pkg_postrm_%s' % pkg, postrm) | 76 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
77 | 77 | ||
78 | # If the systemd class has also been inherited, then don't do anything as | 78 | # Run if the sysvinit feature is present, or if the systemd feature is present |
79 | # the systemd units will override anything created by update-rc.d. | 79 | # but the systemd class hasn't been inherited. We want to run in the latter case |
80 | if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True): | 80 | # as systemd has sysvinit compatibility, but we don't want to always so that |
81 | # pure systemd images don't have redundent sysvinit files. | ||
82 | if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \ | ||
83 | ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)): | ||
81 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) | 84 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) |
82 | if pkgs == None: | 85 | if pkgs == None: |
83 | pkgs = d.getVar('UPDATERCPN', True) | 86 | pkgs = d.getVar('UPDATERCPN', True) |