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.bbclass28
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 2c3ef9edd1..2746c360fe 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -89,52 +89,52 @@ python populate_packages_updatercd () {
89 return 89 return
90 statement = "grep -q -w '/etc/init.d/functions' %s" % path 90 statement = "grep -q -w '/etc/init.d/functions' %s" % path
91 if subprocess.call(statement, shell=True) == 0: 91 if subprocess.call(statement, shell=True) == 0:
92 mlprefix = d.getVar('MLPREFIX', True) or "" 92 mlprefix = d.getVar('MLPREFIX') or ""
93 d.appendVar('RDEPENDS_' + pkg, ' %sinitscripts-functions' % (mlprefix)) 93 d.appendVar('RDEPENDS_' + pkg, ' %sinitscripts-functions' % (mlprefix))
94 94
95 def update_rcd_package(pkg): 95 def update_rcd_package(pkg):
96 bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg) 96 bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg)
97 97
98 localdata = bb.data.createCopy(d) 98 localdata = bb.data.createCopy(d)
99 overrides = localdata.getVar("OVERRIDES", True) 99 overrides = localdata.getVar("OVERRIDES")
100 localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides)) 100 localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides))
101 bb.data.update_data(localdata) 101 bb.data.update_data(localdata)
102 102
103 update_rcd_auto_depend(pkg) 103 update_rcd_auto_depend(pkg)
104 104
105 preinst = d.getVar('pkg_preinst_%s' % pkg, True) 105 preinst = d.getVar('pkg_preinst_%s' % pkg)
106 if not preinst: 106 if not preinst:
107 preinst = '#!/bin/sh\n' 107 preinst = '#!/bin/sh\n'
108 preinst += localdata.getVar('updatercd_preinst', True) 108 preinst += localdata.getVar('updatercd_preinst')
109 d.setVar('pkg_preinst_%s' % pkg, preinst) 109 d.setVar('pkg_preinst_%s' % pkg, preinst)
110 110
111 postinst = d.getVar('pkg_postinst_%s' % pkg, True) 111 postinst = d.getVar('pkg_postinst_%s' % pkg)
112 if not postinst: 112 if not postinst:
113 postinst = '#!/bin/sh\n' 113 postinst = '#!/bin/sh\n'
114 postinst += localdata.getVar('updatercd_postinst', True) 114 postinst += localdata.getVar('updatercd_postinst')
115 d.setVar('pkg_postinst_%s' % pkg, postinst) 115 d.setVar('pkg_postinst_%s' % pkg, postinst)
116 116
117 prerm = d.getVar('pkg_prerm_%s' % pkg, True) 117 prerm = d.getVar('pkg_prerm_%s' % pkg)
118 if not prerm: 118 if not prerm:
119 prerm = '#!/bin/sh\n' 119 prerm = '#!/bin/sh\n'
120 prerm += localdata.getVar('updatercd_prerm', True) 120 prerm += localdata.getVar('updatercd_prerm')
121 d.setVar('pkg_prerm_%s' % pkg, prerm) 121 d.setVar('pkg_prerm_%s' % pkg, prerm)
122 122
123 postrm = d.getVar('pkg_postrm_%s' % pkg, True) 123 postrm = d.getVar('pkg_postrm_%s' % pkg)
124 if not postrm: 124 if not postrm:
125 postrm = '#!/bin/sh\n' 125 postrm = '#!/bin/sh\n'
126 postrm += localdata.getVar('updatercd_postrm', True) 126 postrm += localdata.getVar('updatercd_postrm')
127 d.setVar('pkg_postrm_%s' % pkg, postrm) 127 d.setVar('pkg_postrm_%s' % pkg, postrm)
128 128
129 d.appendVar('RRECOMMENDS_' + pkg, " ${MLPREFIX}${UPDATERCD}") 129 d.appendVar('RRECOMMENDS_' + pkg, " ${MLPREFIX}${UPDATERCD}")
130 130
131 # Check that this class isn't being inhibited (generally, by 131 # Check that this class isn't being inhibited (generally, by
132 # systemd.bbclass) before doing any work. 132 # systemd.bbclass) before doing any work.
133 if not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): 133 if not d.getVar("INHIBIT_UPDATERCD_BBCLASS"):
134 pkgs = d.getVar('INITSCRIPT_PACKAGES', True) 134 pkgs = d.getVar('INITSCRIPT_PACKAGES')
135 if pkgs == None: 135 if pkgs == None:
136 pkgs = d.getVar('UPDATERCPN', True) 136 pkgs = d.getVar('UPDATERCPN')
137 packages = (d.getVar('PACKAGES', True) or "").split() 137 packages = (d.getVar('PACKAGES') or "").split()
138 if not pkgs in packages and packages != []: 138 if not pkgs in packages and packages != []:
139 pkgs = packages[0] 139 pkgs = packages[0]
140 for pkg in pkgs.split(): 140 for pkg in pkgs.split():