summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-25 22:55:05 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-15 14:22:49 +0000
commitd7bf8c17eca8f8c89898a7794462c773c449e983 (patch)
treed18618fca85ca5f0c077032cc7b009344b60f663 /import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
parente2b5abdc9f28cdf8578e5b9be803c8e697443c20 (diff)
downloadblackbird-openbmc-d7bf8c17eca8f8c89898a7794462c773c449e983.tar.gz
blackbird-openbmc-d7bf8c17eca8f8c89898a7794462c773c449e983.zip
Yocto 2.4
Move OpenBMC to Yocto 2.4(rocko) Tested: Built and verified Witherspoon and Palmetto images Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/update-rc.d.bbclass')
-rw-r--r--import-layers/yocto-poky/meta/classes/update-rc.d.bbclass23
1 files changed, 3 insertions, 20 deletions
diff --git a/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass b/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
index 9ba3dacca..e1e0e0487 100644
--- a/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
+++ b/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
@@ -37,7 +37,6 @@ fi
PACKAGE_WRITE_DEPS += "update-rc.d-native"
updatercd_postinst() {
-# Begin section update-rc.d
if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
@@ -46,15 +45,12 @@ if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
fi
update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
fi
-# End section update-rc.d
}
updatercd_prerm() {
-# Begin section update-rc.d
if ${@use_updatercd(d)} && [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
-# End section update-rc.d
}
updatercd_postrm() {
@@ -95,8 +91,7 @@ python populate_packages_updatercd () {
return
statement = "grep -q -w '/etc/init.d/functions' %s" % path
if subprocess.call(statement, shell=True) == 0:
- mlprefix = d.getVar('MLPREFIX') or ""
- d.appendVar('RDEPENDS_' + pkg, ' %sinitscripts-functions' % (mlprefix))
+ d.appendVar('RDEPENDS_' + pkg, ' initd-functions')
def update_rcd_package(pkg):
bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg)
@@ -116,25 +111,13 @@ python populate_packages_updatercd () {
postinst = d.getVar('pkg_postinst_%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst = postinst.splitlines(True)
- try:
- index = postinst.index('# End section update-alternatives\n')
- postinst.insert(index + 1, localdata.getVar('updatercd_postinst'))
- except ValueError:
- postinst.append(localdata.getVar('updatercd_postinst'))
- postinst = ''.join(postinst)
+ postinst += localdata.getVar('updatercd_postinst')
d.setVar('pkg_postinst_%s' % pkg, postinst)
prerm = d.getVar('pkg_prerm_%s' % pkg)
if not prerm:
prerm = '#!/bin/sh\n'
- prerm = prerm.splitlines(True)
- try:
- index = prerm.index('# Begin section update-alternatives\n')
- prerm.insert(index, localdata.getVar('updatercd_prerm'))
- except ValueError:
- prerm.append(localdata.getVar('updatercd_prerm'))
- prerm = ''.join(prerm)
+ prerm += localdata.getVar('updatercd_prerm')
d.setVar('pkg_prerm_%s' % pkg, prerm)
postrm = d.getVar('pkg_postrm_%s' % pkg)
OpenPOWER on IntegriCloud