diff options
author | maximilian attems <maks@debian.org> | 2007-08-25 14:32:07 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2007-08-25 14:32:07 +0200 |
commit | 45aa4bb4bf35e8577c5de25cf3bf9b80f72f9b8e (patch) | |
tree | ffc8fde2f17e2c90987550de5174a41400755739 /mkinitramfs | |
parent | f0942dc8aceb12e2e802a80e81a62f596424c407 (diff) | |
download | initramfs-tools-45aa4bb4bf35e8577c5de25cf3bf9b80f72f9b8e.tar.gz initramfs-tools-45aa4bb4bf35e8577c5de25cf3bf9b80f72f9b8e.zip |
mkinitramfs: cope when no busybox is around
only warn on cases where we know that busybox is needed.
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-x | mkinitramfs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mkinitramfs b/mkinitramfs index c7a4598..71c1332 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -244,9 +244,14 @@ if [ -n "${ROOT}" ]; then fi # Busybox -if [ "x${BUSYBOX}" = "xn" ]; then - ln -s ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh - echo "Warning: Busybox is required for successful boot!" +if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then + mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh + # those root need busybox + eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')" + if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ] \ + || [ "${r_dev#/dev/md}" != "${r_dev}" ]; then + echo "Warning: Busybox is required for successful boot!" + fi else rm -f ${DESTDIR}/bin/sh rm -f ${DESTDIR}/bin/busybox |