busybox: provide postrm for package mdev
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 3 Jan 2011 15:35:03 +0000 (16:35 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 13 Jan 2011 21:57:24 +0000 (22:57 +0100)
Remove the mdev runlevel entry on package removal.

Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
recipes/busybox/busybox.inc

index a9d1e6e..13227c9 100644 (file)
@@ -322,16 +322,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}"