1.1 --- a/uml-make-image Mon Apr 22 23:00:48 2013 +0200
1.2 +++ b/uml-make-image Wed Apr 24 00:42:39 2013 +0200
1.3 @@ -54,11 +54,24 @@
1.4 fi
1.5
1.6 echo "Making the filesystem with size ${IMAGESIZE}GB..."
1.7 -dd if=/dev/zero of=$IMAGE bs=1024 count=1 seek=$(($IMAGESIZE*1024*1024-1024))
1.8 -mkfs.ext3 $IMAGE
1.9 +if dd if=/dev/zero of=$IMAGE bs=1024 count=1 seek=$(($IMAGESIZE*1024*1024-1024)) ; then
1.10 + mkfs.ext3 $IMAGE
1.11 +else
1.12 + cat 1>&2 <<EOF
1.13 +Unable to create an image file for the root partition.
1.14 +See the error messages above for more information.
1.15 +EOF
1.16 + exit 1
1.17 +fi
1.18
1.19 echo "Making the swap file with size ${SWAPSIZE}MB..."
1.20 -dd if=/dev/zero of=$SWAPIMAGE bs=1M count=$SWAPSIZE
1.21 +if ! dd if=/dev/zero of=$SWAPIMAGE bs=1M count=$SWAPSIZE ; then
1.22 + cat 1>&2 <<EOF
1.23 +Unable to create an image file for the swap partition.
1.24 +See the error messages above for more information.
1.25 +EOF
1.26 + exit 1
1.27 +fi
1.28
1.29 # Image population activities.
1.30