]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
cr-ensure-disk-space: Fix -n option
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 9 Mar 2015 16:17:44 +0000 (12:17 -0400)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Mar 2015 18:57:00 +0000 (18:57 +0000)
This would not really do a dry run - instead it would stop after
deleting one flight's logs!

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
cr-ensure-disk-space

index 884be26b078d03b78b18856d9347446e230ac533..1c665b31268bf239557ded82651147b8baf54ebe 100755 (executable)
@@ -99,6 +99,8 @@ for (;;) {
 
     printf "...";
 
+    die if $dryrun;
+
     my $spawn= sub {
         $!=0; my $r= system @_; die "@_ $r $!" if $r;
     };
@@ -114,7 +116,6 @@ END
     $spawn->(qw(rm -rf), $flight);
 
     printf "done.\n";
-    exit 0 if $dryrun;
 }
 
 printf "ok.\n";