Bug#338405: another patch for busybox support
The following will significantly reduce the size of an initramfs when busybox
is used while also enabling all busybox commands (handy if you have an option
to run a shell from the initramfs for recovery). In spite of what maks
thinks, the busybox option is still there, so it should be made to work well.
--- mkinitramfs.orig 2006-12-02 15:42:16.000000000 +1100
+++ mkinitramfs 2006-12-02 17:25:38.000000000 +1100
@@ -228,7 +228,12 @@
else
rm -f ${DESTDIR}/bin/sh
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
- ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+ rm ${DESTDIR}/bin/busybox
+ cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+ for n in `busybox | tail -19 | tr , \\n | sed -e "s/ \|\t//"|grep .` ;
do
+ ln -f /bin/busybox ${DESTDIR}/bin/$n
+ done
+ ln -f /bin/busybox ${DESTDIR}/bin/sh
fi
# Modutils
Reply to: