# hook addon for busybox # check for a decent version of busybox # ubuntu busybox-initramfs don't have some utils if [ $DESTDIR/bin/busybox ]; then test1=$($DESTDIR/bin/busybox tftp --help 2>&1 | grep -c -i usage) test2=$($DESTDIR/bin/busybox awk --help 2>&1 | grep -c -i usage) test3=$($DESTDIR/bin/busybox losetup --help 2>&1 | grep -c -i usage) if [ $test1 = 0 -o $test2 = 0 -o $test3 = 0 ]; then if [ -x /bin/busybox ]; then _echo " INFO: Better busybox found, replacing it..." rm $DESTDIR/bin/busybox cpifexists /bin/busybox /bin/ else _echo "ERROR:" _echo "" _echo " The initramfs busybox version don't have some needed utils." _echo " Please install other busybox that have awk, tftp, and losetup" _echo "" _echo " This TCOS image will not work." _echo "" fi else _echo " busybox pass test: OK" fi # check for busybox static #if ldd /bin/busybox | grep -q libc; then # _echo " busybox (not-static) getty and login disabled" #fi else _echo "busybox not found in initramfs yet..." fi