[oe-commits] Bernhard Reutner-Fischer : busybox: provide postrm for package mdev

git version control git at git.openembedded.org
Wed Feb 16 17:56:19 UTC 2011


Module: openembedded.git
Branch: shr/testing2011.1
Commit: f93e422226734ab6044aca55ada19e12b5ba393c
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f93e422226734ab6044aca55ada19e12b5ba393c

Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Date:   Mon Jan  3 16:35:03 2011 +0100

busybox: provide postrm for package mdev

Remove the mdev runlevel entry on package removal.

Acked-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>

---

 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 5b0e90a..ceca8d7 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -329,16 +329,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}"
 





More information about the Openembedded-commits mailing list