diff --git a/KNOWN_BUGS.markdown b/KNOWN_BUGS.markdown index 29bfdf6..26da36a 100644 --- a/KNOWN_BUGS.markdown +++ b/KNOWN_BUGS.markdown @@ -11,8 +11,6 @@ Bugs to fix rather soon [Bug Report](http://xen-tools.org/pipermail/xen-tools-discuss/2010-May/000757.html) -* `xen-delete-image` ignores extension setting - * partitions were mounted in config file order, not in mountpoint order. That implies that if you specified : diff --git a/bin/xen-delete-image b/bin/xen-delete-image index c222707..3784276 100755 --- a/bin/xen-delete-image +++ b/bin/xen-delete-image @@ -8,6 +8,10 @@ xen-delete-image - Delete previously created Xen instances. xen-delete-image [options] [--hostname=]imageName1 [--hostname=]imageName2 + Filename Options: + --extension Specify the file extension to use. An empty extension is equal + to any extension. + Help Options: --help Show help information. --manual Read the manual for this script. @@ -181,6 +185,11 @@ my $RELEASE = '4.4~dev'; # $CONFIG{ 'xm' } = findXenToolstack(); +# +# Default values +# +$CONFIG{ 'extension' } = '.cfg'; + # # Read the global configuration file if it exists. @@ -282,6 +291,7 @@ sub parseCommandLineArguments "dry-run", \$CONFIG{ 'dry-run' }, "lvm=s", \$CONFIG{ 'lvm' }, "evms=s", \$CONFIG{ 'evms' }, + "extension:s", \$CONFIG{ 'extension' }, "hostname=s@", \$CONFIG{ 'hostname' }, "test", \$CONFIG{ 'test' }, "verbose", \$CONFIG{ 'verbose' }, @@ -371,17 +381,17 @@ sub deleteXenImage # # Delete the Xen auto-start file if it exists. # - if ( -e "/etc/xen/auto/$hostname.cfg" ) + if ( -e "/etc/xen/auto/$hostname".$CONFIG{ 'extension' } ) { - push( @delete, "/etc/xen/auto/$hostname.cfg" ); + push( @delete, "/etc/xen/auto/$hostname".$CONFIG{ 'extension' } ); } # # Delete the Xen configuration file if it exists. # - if ( -e "/etc/xen/$hostname.cfg" ) + if ( -e "/etc/xen/$hostname".$CONFIG{ 'extension' } ) { - push( @delete, "/etc/xen/$hostname.cfg" ); + push( @delete, "/etc/xen/$hostname".$CONFIG{ 'extension' } ); } # diff --git a/debian/changelog b/debian/changelog index 446a5e9..7389895 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,9 +11,8 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low --memory. (Closes: #691320) Document the recognized units. - Default DomUs to use the noop scheduler (Closes: #693131) - Overwork TLS disabling on Debian and Ubuntu - - xen-list-images update: - + now understands the --extension option. - + also outputs the file name of the config file + - xen-list-images now also outputs the file name of the config file. + - xen-list-images and xen-delete-image now understand --extension. - Fixes "--extension=" with empty parameter. - Sarge amd64 case handle properly - Remove CVS revisions from --version output