From 89b4df0e2a6141cd5ca39dc4971c7419efc65133 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 10 Feb 2003 22:37:09 +0000 Subject: count space needed for the filesystem so that we don't end up with 3 mbytes of free space if /tmp was ext3 --- tools/make_mdkinst_stage2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/make_mdkinst_stage2 b/tools/make_mdkinst_stage2 index 502dc14fd..48182616a 100755 --- a/tools/make_mdkinst_stage2 +++ b/tools/make_mdkinst_stage2 @@ -57,12 +57,12 @@ for i in /usr/share/keymaps /usr/share/xmodmap; do rm -rf $STAGE2TMP/$i done - +eval `find $STAGE2TMP | perl -MMDK::Common -lne '-l or $s += round_up(-s, 1024); $i++; END { print "size=",int($s/1024),";inodes=$i" }'`; mkdir -p $MNTPOINT 2>/dev/null for i in $MNTPOINT $STAGE2; do $SUDO umount $i 2>/dev/null ; done -dd if=/dev/zero of=$STAGE2 bs=1k count=$[ `du -s $STAGE2TMP | cut -f1` + 1024 + 200 ] -$MKE2FS -N 1100 $STAGE2 +dd if=/dev/zero of=$STAGE2 bs=1k count=$[ $size + 1024 + 200 ] +$MKE2FS -N $[$inodes + 50] $STAGE2 $SUDO mount -t ext2 $STAGE2 $MNTPOINT -o loop rmdir $MNTPOINT/lost+found -- cgit v1.2.1