]> xenbits.xensource.com Git - people/dariof/xen-tools.git/commitdiff
xen-delete-image now also understand --extension
authorAxel Beckert <abe@deuxchevaux.org>
Fri, 18 Jan 2013 01:13:19 +0000 (02:13 +0100)
committerAxel Beckert <abe@deuxchevaux.org>
Fri, 18 Jan 2013 01:13:19 +0000 (02:13 +0100)
KNOWN_BUGS.markdown
bin/xen-delete-image
debian/changelog

index 29bfdf6121b9c33ae576344a0276271e660d2e75..26da36a5a9116f96640296fb5a5478732fdccc25 100644 (file)
@@ -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 :
 
index c22270738557bcf9fb69a742f32acca7123a873f..3784276359d2f352045ee0795517cbd47a3cc4d7 100755 (executable)
@@ -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' } );
     }
 
     #
index 446a5e9b5f947756f09ed541d81615127ef7167c..73898957bd486b73b32b6b4347d058aca3b28052 100644 (file)
@@ -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