1 DEPENDS_append = " update-rc.d"
2 RDEPENDS_append = " update-rc.d"
4 INIT_D_DIR = "${sysconfdir}/init.d"
7 if test "x$D" != "x"; then
12 update-rc.d $D ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
16 if test "x$D" != "x"; then
19 ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
21 update-rc.d $D ${INITSCRIPT_NAME} remove
24 python __anonymous() {
25 if oe.data.getVar('INITSCRIPT_NAME', d) == None:
26 raise oe.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % oe.data.getVar('FILE', d)
27 if oe.data.getVar('INITSCRIPT_PARAMS', d) == None:
28 raise oe.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % oe.data.getVar('FILE', d)
31 python populate_packages_prepend () {
32 pkg = oe.data.getVar('PN', d, 1)
33 packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
34 if not pkg in packages:
36 oe.note('adding update-rc.d calls to postinst/postrm for %s' % pkg)
37 postinst = oe.data.getVar('pkg_postinst_%s' % pkg, d, 1) or oe.data.getVar('pkg_postinst', d, 1)
39 postinst = '#!/bin/sh\n'
40 postinst += oe.data.getVar('updatercd_postinst', d, 1)
41 oe.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
42 postrm = oe.data.getVar('pkg_postrm_%s' % pkg, d, 1) or oe.data.getVar('pkg_postrm', d, 1)
44 postrm = '#!/bin/sh\n'
45 postrm += oe.data.getVar('updatercd_postrm', d, 1)
46 oe.data.setVar('pkg_postrm_%s' % pkg, postrm, d)