From b4b2ffc1cfa62fd4e23ada7af8c3296158cd3173 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 18 Dec 2005 18:38:21 +0000 Subject: [PATCH] 2005-12-18 18:38:21 by steve Fixes for the filesystem type from Radu Spineanu. --- xen-create-image | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/xen-create-image b/xen-create-image index 3446483..6550dea 100755 --- a/xen-create-image +++ b/xen-create-image @@ -120,7 +120,7 @@ Read the manual, with examples. -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.14 2005-12-18 16:32:32 steve Exp $ + $Id: xen-create-image,v 1.15 2005-12-18 18:38:21 steve Exp $ =cut @@ -163,7 +163,6 @@ my $DIR; # Mandatory. # # my $MIRROR="http://ftp.us.debian.org/debian"; # set with '--mirror=http://www.etc.com"' -my $FS='ext3'; @@ -284,9 +283,9 @@ print "Done\n"; print "Creating disk image: $image\n"; $CONFIG{'size'} =~ s/Mb*$/k/i; `/bin/dd if=/dev/zero of=$image bs=$CONFIG{'size'} count=1 seek=1024 >/dev/null 2>/dev/null`; -print "Creating EXT3 filesystem\n"; +print "Creating $CONFIG{'fs'} filesystem\n"; -my $create = $FILESYSTEM_CREATE{lc( $FS ) } . $image; +my $create = $FILESYSTEM_CREATE{lc( $CONFIG{'fs'} ) } . $image; `$create`; print "Done\n"; @@ -295,7 +294,7 @@ print "Done\n"; # Now mount the image, in a secure temporary location. # my $dir = tempdir( CLEANUP => 1 ); -my $mount_cmd = "mount " . $FILESYSTEM_MOUNT{lc($FS)} . " -o loop $image $dir"; +my $mount_cmd = "mount " . $FILESYSTEM_MOUNT{lc($CONFIG{'fs'})} . " -o loop $image $dir"; `$mount_cmd`; @@ -382,7 +381,7 @@ if ( -d $dir . "/lib/tls" ) print "Setting up /etc/fstab .. "; open( TAB, ">", $dir . "/etc/fstab" ); print TAB<