summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/update-rc.d.bbclass19
1 files changed, 11 insertions, 8 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index f9d55fbec8..51ad8b1ae9 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -75,12 +75,15 @@ 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 pkgs = d.getVar('INITSCRIPT_PACKAGES', True) 78 # If the systemd class has also been inherited, then don't do anything as
79 if pkgs == None: 79 # the systemd units will override anything created by update-rc.d.
80 pkgs = d.getVar('UPDATERCPN', True) 80 if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True):
81 packages = (d.getVar('PACKAGES', True) or "").split() 81 pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
82 if not pkgs in packages and packages != []: 82 if pkgs == None:
83 pkgs = packages[0] 83 pkgs = d.getVar('UPDATERCPN', True)
84 for pkg in pkgs.split(): 84 packages = (d.getVar('PACKAGES', True) or "").split()
85 update_rcd_package(pkg) 85 if not pkgs in packages and packages != []:
86 pkgs = packages[0]
87 for pkg in pkgs.split():
88 update_rcd_package(pkg)
86} 89}