[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 21/32] cr-ensure-disk-space: Fix -n option



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@xxxxxxxxxxxxx>
---
 cr-ensure-disk-space |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space
index 884be26..1c665b3 100755
--- a/cr-ensure-disk-space
+++ b/cr-ensure-disk-space
@@ -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";
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.