From 1008a4255288fc9155b31fcc8ec06ab5555ba20a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 4 May 2004 09:15:34 -0400 Subject: [PATCH] Fix numberous problems in Debian's initrd scripts: * In the mkinitrd script, make sure the directories exist before trying to copy in the needed shared libraries. (Closes: #244058, #246480) * In the mkinitrd script, use LD_ASSUME_KERNEL=2.4 if necessary. (Closes: #245931) * In the mkinitrd script copy in /usr/bin/awk instead of /usr/bin/mawk. (Closes: #245670) * In the initrd script, fail quietly if /mnt/etc/fstab does not exist. (Closes: #246917) --- debian/changelog | 13 +++++++++++++ debian/e2fsprogs.initrd | 6 ++++-- debian/e2fsprogs.mkinitrd | 13 +++++++++++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1ee3059..696843e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +e2fsprogs (1.35-6) unstable; urgency=low + + * In the mkinitrd script, make sure the directories exist before + trying to copy in the needed shared libraries. (Closes: #244058, #246480) + * In the mkinitrd script, use LD_ASSUME_KERNEL=2.4 if necessary. + (Closes: #245931) + * In the mkinitrd script copy in /usr/bin/awk instead of /usr/bin/mawk. + (Closes: #245670) + * In the initrd script, fail quietly if /mnt/etc/fstab does not exist. + (Closes: #246917) + + -- Theodore Y. Ts'o Tue, 4 May 2004 03:00:24 -0400 + e2fsprogs (1.35-5) unstable; urgency=low * Add uuid_unparse_upper() and uuid_unparse_lower() functions to the diff --git a/debian/e2fsprogs.initrd b/debian/e2fsprogs.initrd index 12e2715..cf23800 100644 --- a/debian/e2fsprogs.initrd +++ b/debian/e2fsprogs.initrd @@ -10,8 +10,10 @@ if [ $rootdev != 256 ]; then mount -nt devfs devfs /devfs > /dev/null 2>&1 get_device mount_device - ext3root=`awk '!/^ *#/ { if (($2 == "/") && ($3 == "ext3")) {print $1;}}' < /mnt/etc/fstab` - ext2root=`awk '!/^ *#/ { if (($2 == "/") && ($3 == "ext2")) {print $1;}}' < /mnt/etc/fstab` + if test -f /mnt/etc/fstab ; then + ext3root=`awk '!/^ *#/ { if (($2 == "/") && ($3 == "ext3")) {print $1;}}' < /mnt/etc/fstab` + ext2root=`awk '!/^ *#/ { if (($2 == "/") && ($3 == "ext2")) {print $1;}}' < /mnt/etc/fstab` + fi umount -n /devfs > /dev/null 2>&1 umount -n /mnt > /dev/null 2>&1 if test -n "$ext3root" -o -n "$ext2root" ; then diff --git a/debian/e2fsprogs.mkinitrd b/debian/e2fsprogs.mkinitrd index 6686bf3..0013dec 100644 --- a/debian/e2fsprogs.mkinitrd +++ b/debian/e2fsprogs.mkinitrd @@ -2,8 +2,17 @@ cp /usr/share/e2fsprogs/initrd.ext3-add-journal \ $INITRDDIR/scripts/ext3-add-journal.sh cp /sbin/tune2fs $INITRDDIR/sbin -cp /usr/bin/mawk $INITRDDIR/bin/awk -for i in `ldd /sbin/tune2fs /usr/bin/mawk | sort -u | awk '{print $3}'` +cp /usr/bin/awk $INITRDDIR/bin/awk + +case "$VERSION" in + 2.4.*) + LD_ASSUME_KERNEL=2.4 + export LD_ASSUME_KERNEL + ;; +esac + +for i in `ldd /sbin/tune2fs /usr/bin/awk | sort -u | awk '{print $3}'` do + mkdir -p `dirname $INITRDDIR/$i` cp $i $INITRDDIR/$i done -- 1.8.3.1