[patch] typo in mkinitrd

From: Pat Orourke (orourke@missioncriticallinux.com)
Date: Mon Jan 10 2000 - 14:18:02 EST


This is a patch for a typo in the findmodule() function of mkinitrd.
I also added an explicit check to ensure that the modules will fit in
the image (I found this to be more helpful than simply having tar run
out of space).

Pat

-- 
Patrick O'Rourke
orourke@missioncriticallinux.com

--- /sbin/mkinitrd Wed Sep 22 09:44:30 1999 +++ mkinitrd Mon Jan 10 12:11:17 2000 @@ -50,7 +50,7 @@ if [ ! -f /lib/modules/$kernel/$fmPath ]; then # ignore the absence of the scsi modules - for i in $PRESCSIMODS; do + for n in $PRESCSIMODS; do if [ "$n" = "$2" ]; then return; fi @@ -292,7 +292,16 @@ chmod +x $RCFILE -(cd $MNTIMAGE; tar cf - .) | (cd $MNTPOINT; tar xf -) +# +# Verify that there is enough room for the chosen modules... +# +kb_needed=`du -sk $MNTIMAGE | awk '{print $1}'` +if [ $kb_needed -gt $IMAGESIZE ] +then + echo "$kb_needed too large for chosen image size of $IMAGESIZE" >&2 +else + (cd $MNTIMAGE; tar cf - .) | (cd $MNTPOINT; tar xf -) +fi umount $MNTPOINT losetup -d $LODEV

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:16 EST