kadischi/livecd_generator livecd-mkinitrd.sh,1.21,1.22
Jasper O'neal Hartline (autopsy)
fedora-extras-commits at redhat.com
Thu Aug 24 06:04:10 UTC 2006
Author: autopsy
Update of /cvs/devel/kadischi/livecd_generator
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25001/kadischi/livecd_generator
Modified Files:
livecd-mkinitrd.sh
Log Message:
Make things consistent with blocksize and image sizes with initrds
Index: livecd-mkinitrd.sh
===================================================================
RCS file: /cvs/devel/kadischi/livecd_generator/livecd-mkinitrd.sh,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- livecd-mkinitrd.sh 21 Aug 2006 02:05:03 -0000 1.21
+++ livecd-mkinitrd.sh 24 Aug 2006 06:04:08 -0000 1.22
@@ -209,9 +209,13 @@
/bin/mknod /dev/loop$i b 7 $i
fi
done
-
-/bin/dd if=/dev/zero of=$IMAGE bs=1k count=$IMAGESIZE 2> /dev/null || exit 1
-
+echo $kernel >/dev/null | grep FC5
+if [ "$?" -eq "0" ]; then
+ /bin/dd if=/dev/zero of=$IMAGE bs=1k count=$IMAGESIZE 2> /dev/null || exit 1
+else
+ IMAGESIZE=2500
+ /bin/dd if=/dev/zero of=$IMAGE bs=4k count=$IMAGESIZE 2> /dev/null || exit 1
+fi
LODEV=$(losetup -f)
if [ -z "$LODEV" ]; then
@@ -225,9 +229,9 @@
# We have to "echo y |" so that it doesn't complain about $IMAGE not
# being a block device
# We also use -b 4096 to rectify issue: BZ #202715
-echo $kernel | grep FC5
+echo $kernel >/dev/null | grep FC5
if [ "$?" -eq "0" ]; then
- echo y | /sbin/mke2fs $LODEV $IMAGESIZE >/dev/null 2>/dev/null
+ echo y | /sbin/mke2fs -b 1024 $LODEV $IMAGESIZE >/dev/null 2>/dev/null
else
echo y | /sbin/mke2fs -b 4096 $LODEV $IMAGESIZE >/dev/null 2>/dev/null
fi
More information about the fedora-extras-commits
mailing list