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 | |
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.
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | mkinitramfs | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 1d1fc29..bba283d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low for kernel since Etch. * debian/control: Tighten dep on latest klibc for BUSYBOX=n usage. Add XS-Vcs-* fields. Mv busybox from Depends to Recommends. + * mkinitramfs: Cope when no busybox is around warn on md/lvm root. - -- maximilian attems <maks@debian.org> Sat, 25 Aug 2007 14:04:17 +0200 + -- maximilian attems <maks@debian.org> Sat, 25 Aug 2007 14:29:42 +0200 initramfs-tools (0.90a) unstable; urgency=high 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 |