busybox: fix linuxrc link and put it in a seperate package
authorKoen Kooi <koen@openembedded.org>
Mon, 23 Mar 2009 16:26:37 +0000 (17:26 +0100)
committerKoen Kooi <koen@openembedded.org>
Mon, 23 Mar 2009 16:26:37 +0000 (17:26 +0100)
* runtime tested on a beagleboard

recipes/busybox/busybox.inc
recipes/busybox/busybox_1.13.2.bb

index cb8eb53..acf47f2 100644 (file)
@@ -142,10 +142,10 @@ pkg_postinst_${PN} () {
        # so the update-alternatives script will get the utilities it needs
        # (update-alternatives have no problem replacing links later anyway)
        test -n 2> /dev/null || alias test='busybox test'
-       if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; busybox ln -s $to $link; fi; done </etc/busybox.links; fi
+       if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; /*) to="/bin/busybox";; esac; busybox ln -s $to $link; fi; done </etc/busybox.links; fi
        
        # This adds the links, remember that this has to work when building an image too, hence the $D
-       while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
+       while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; /*) to="/bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
 }
 
 pkg_prerm_${PN} () {
@@ -173,6 +173,7 @@ pkg_prerm_${PN} () {
                        /*/*/*) to="../../bin/busybox";;
                        /bin/*) to="busybox";;
                        /*/*) to="../bin/busybox";;
+                       /*) to="/bin/busybox";;         
                esac
                bn=`basename $link`
                sh /usr/bin/update-alternatives --remove $bn $to
@@ -183,6 +184,10 @@ 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"
@@ -192,5 +197,3 @@ fi
        update-rc.d $OPT mdev start 06 S .
 }
 
-
-
index d3e7f9a..8ecbc1e 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r16"
+PR = "r17"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \