From 16d71a6ebffaf01bbcef202769d500f883d42b26 Mon Sep 17 00:00:00 2001 From: steve Date: Fri, 21 Jul 2006 20:14:30 +0000 Subject: [PATCH] 2006-07-21 20:14:30 by steve --force will work for xfs filesystem types. Closes: #377684 --- bin/xen-create-image | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 1b98e41..d29c051 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -433,7 +433,7 @@ Install an X11 server, using VNC and XDM -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.53 2006-06-29 15:35:40 steve Exp $ + $Id: xen-create-image,v 1.54 2006-07-21 20:14:30 steve Exp $ =cut @@ -710,8 +710,12 @@ sub setupDefaultOptions # NOTE: These commands end in a trailing slash. The last parameter is # added as the loopback file/LVM volume to create the fs on.... # + # NOTE 2: Each of these scripts will "force" the creation of a new + # filesystem, even if it exists. This script must detect + # prior existance itself. + # $CONFIG{'make_fs_ext3'} = '/sbin/mkfs.ext3 -F '; - $CONFIG{'make_fs_xfs'} = '/sbin/mkfs.xfs -d name='; + $CONFIG{'make_fs_xfs'} = '/sbin/mkfs.xfs -f -d name='; $CONFIG{'make_fs_reiserfs'} = '/sbin/mkfs.reiserfs -f -q '; # @@ -855,7 +859,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.53 $'; + my $REVISION = '$Revision: 1.54 $'; if ( $REVISION =~ /1.([0-9.]+) / ) { @@ -1386,18 +1390,6 @@ sub createFilesystem exit; } - # - # Special case. - # - # If the filesystem is xfs, and the image already existed before - # so the user is using '--force' we add the '-f' flag to force - # mkfs.xfs to recreate an image rather than complaining. - # - if ( ( $CONFIG{'fs'} eq 'xfs' ) && $CONFIG{'force'} ) - { - $command .= " -f "; - } - # # OK we have the command and the filesystem. Create it. #