From patchwork Mon Jan 3 20:02:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [09/12] busybox: provide postrm for package mdev Date: Mon, 03 Jan 2011 20:02:03 -0000 From: Bernhard Reutner-Fischer X-Patchwork-Id: 162 Message-Id: <1294084926-3115-9-git-send-email-rep.dot.nop@gmail.com> To: openembedded-devel@lists.openembedded.org Remove the mdev runlevel entry on package removal. Signed-off-by: Bernhard Reutner-Fischer Acked-by: Otavio Salvador --- recipes/busybox/busybox.inc | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc index 97d6f78..59653e0 100644 --- a/recipes/busybox/busybox.inc +++ b/recipes/busybox/busybox.inc @@ -361,16 +361,16 @@ PACKAGES =+ "${PN}-mdev" FILES_${PN}-mdev = "${sysconfdir}/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/init.d/mdev" RDEPENDS_${PN}-mdev += "${PN}" -PACKAGES =+ "${PN}-linuxrc" -FILES_${PN}-linuxrc = "linuxrc" -RDEPENDS_${PN}-linuxrc += "${PN}" - pkg_postinst_${PN}-mdev() { -if test "x$D" != "x"; then - OPT="-r $D" -else - OPT="-s" -fi + [ -n "$D" ] && OPT="-r $D" || OPT="-s" update-rc.d $OPT mdev start 06 S . } +pkg_postrm_${PN}-mdev() { + [ -n "$D" ] && OPT="-r $D" || OPT="-s" + update-rc.d $OPT -f mdev remove +} + +PACKAGES =+ "${PN}-linuxrc" +FILES_${PN}-linuxrc = "linuxrc" +RDEPENDS_${PN}-linuxrc += "${PN}"