summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r--meta/classes/update-rc.d.bbclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index db88a8e764..bddead4a25 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -47,7 +47,7 @@ python populate_packages_prepend () {
47 def update_rcd_package(pkg): 47 def update_rcd_package(pkg):
48 bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) 48 bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg)
49 localdata = bb.data.createCopy(d) 49 localdata = bb.data.createCopy(d)
50 overrides = localdata.getVar("OVERRIDES", 1) 50 overrides = localdata.getVar("OVERRIDES", True)
51 localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides)) 51 localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides))
52 bb.data.update_data(localdata) 52 bb.data.update_data(localdata)
53 53
@@ -56,28 +56,28 @@ python populate_packages_prepend () {
56 execute on the target. Not doing so may cause update_rc.d postinst invoked 56 execute on the target. Not doing so may cause update_rc.d postinst invoked
57 twice to cause unwanted warnings. 57 twice to cause unwanted warnings.
58 """ 58 """
59 postinst = localdata.getVar('pkg_postinst', 1) 59 postinst = localdata.getVar('pkg_postinst', True)
60 if not postinst: 60 if not postinst:
61 postinst = '#!/bin/sh\n' 61 postinst = '#!/bin/sh\n'
62 postinst += localdata.getVar('updatercd_postinst', 1) 62 postinst += localdata.getVar('updatercd_postinst', True)
63 d.setVar('pkg_postinst_%s' % pkg, postinst) 63 d.setVar('pkg_postinst_%s' % pkg, postinst)
64 64
65 prerm = localdata.getVar('pkg_prerm', 1) 65 prerm = localdata.getVar('pkg_prerm', True)
66 if not prerm: 66 if not prerm:
67 prerm = '#!/bin/sh\n' 67 prerm = '#!/bin/sh\n'
68 prerm += localdata.getVar('updatercd_prerm', 1) 68 prerm += localdata.getVar('updatercd_prerm', True)
69 d.setVar('pkg_prerm_%s' % pkg, prerm) 69 d.setVar('pkg_prerm_%s' % pkg, prerm)
70 70
71 postrm = localdata.getVar('pkg_postrm', 1) 71 postrm = localdata.getVar('pkg_postrm', True)
72 if not postrm: 72 if not postrm:
73 postrm = '#!/bin/sh\n' 73 postrm = '#!/bin/sh\n'
74 postrm += localdata.getVar('updatercd_postrm', 1) 74 postrm += localdata.getVar('updatercd_postrm', True)
75 d.setVar('pkg_postrm_%s' % pkg, postrm) 75 d.setVar('pkg_postrm_%s' % pkg, postrm)
76 76
77 pkgs = d.getVar('INITSCRIPT_PACKAGES', 1) 77 pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
78 if pkgs == None: 78 if pkgs == None:
79 pkgs = d.getVar('UPDATERCPN', 1) 79 pkgs = d.getVar('UPDATERCPN', True)
80 packages = (d.getVar('PACKAGES', 1) or "").split() 80 packages = (d.getVar('PACKAGES', True) or "").split()
81 if not pkgs in packages and packages != []: 81 if not pkgs in packages and packages != []:
82 pkgs = packages[0] 82 pkgs = packages[0]
83 for pkg in pkgs.split(): 83 for pkg in pkgs.split():