aboutsummaryrefslogtreecommitdiffstats
path: root/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2005-06-28 12:51:44 +0000
committerPhil Blundell <philb@gnu.org>2005-06-28 12:51:44 +0000
commitf9186ef3e24f59340c74f211450d747d3b84ec4f (patch)
tree04cb9eb68fc9239c742aa56df36568ec7c9bbdee /classes/update-rc.d.bbclass
parentdaa3be05e66e77bef854b9f4a2ede32178f4c9c8 (diff)
downloadopenembedded-f9186ef3e24f59340c74f211450d747d3b84ec4f.tar.gz
provide both postrm and prerm for update-rc.d users
BKrev: 42c147e0CkwnoUmrLRuV35U7XC-5iQ
Diffstat (limited to 'classes/update-rc.d.bbclass')
-rw-r--r--classes/update-rc.d.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass
index ffa5d49a81..0bfba467c1 100644
--- a/classes/update-rc.d.bbclass
+++ b/classes/update-rc.d.bbclass
@@ -20,6 +20,9 @@ if test "x$D" != "x"; then
else
${INIT_D_DIR}/${INITSCRIPT_NAME} stop
fi
+}
+
+updatercd_postrm() {
update-rc.d $D ${INITSCRIPT_NAME} remove
}
@@ -49,6 +52,11 @@ python populate_packages_prepend () {
prerm = '#!/bin/sh\n'
prerm += bb.data.getVar('updatercd_prerm', localdata, 1)
bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
+ postrm = bb.data.getVar('pkg_postrm', localdata, 1)
+ if not postrm:
+ postrm = '#!/bin/sh\n'
+ postrm += bb.data.getVar('updatercd_postrm', localdata, 1)
+ bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
pkgs = bb.data.getVar('INITSCRIPT_PACKAGES', d, 1)
if pkgs == None: