summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rwxr-xr-xmkinitramfs11
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