Bug#338405: another patch
The attached patch creates a new config option ONLY_BUSYBOX which can be set
if you want to use busybox instead of kinit. It saves over 200K of
compressed size on my system.
I believe that this should be included, it doesn't stop kinit being used,
merely provides another option.
--- /usr/sbin/mkinitramfs 2006-12-20 02:22:05.000000000 +1100
+++ mkinitramfs 2006-12-31 13:08:52.000000000 +1100
@@ -229,7 +229,15 @@
rm -f ${DESTDIR}/bin/sh
rm -f ${DESTDIR}/bin/busybox
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
- ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+ if [ "x${ONLY_BUSYBOX}" = "xn" -o "x${ONLY_BUSYBOX}" = "x" ]; then
+ ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+ else
+ rm ${DESTDIR}/bin/busybox ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/minips
+ cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+ for n in `busybox | tail -19 | tr , \\\\n | sed -e "s/ \|\t//"|grep .|grep -v busybox` ; do
+ ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/$n
+ done
+ fi
fi
# Modutils
Reply to: