]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
cr-ensure-disk-space: Move LogsPublish decomposition up
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 9 Mar 2015 15:51:29 +0000 (11:51 -0400)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Mar 2015 18:56:02 +0000 (18:56 +0000)
We are going to want this for the df.
No functional change yet.

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

index aeaf57210f2cb7a6b190e56c4c3f39a610ef50cb..ff07b769c1af2a9e0fe09ccea0b9ac9ee92d0f38 100755 (executable)
@@ -50,6 +50,9 @@ my $chkq= $dbh_tests->prepare("SELECT * FROM flights WHERE flight=?");
 our @flights;
 our @sshopts= qw(-o batchmode=yes);
 
+$c{LogsPublish} =~ m/\:/ or die "$c{LogsPublish} ?";
+my ($pubhost, $pubdir) = ($`,$'); #';
+
 for (;;) {
     open P, "df --block-size=1M -P . |" or die $!;
     $_= <P>;
@@ -83,9 +86,6 @@ for (;;) {
 
     die "age $age" if $age < $c{LogsMinExpireAge};
 
-    $c{LogsPublish} =~ m/\:/ or die "$c{LogsPublish} ?";
-    my ($pubhost, $pubdir) = ($`,$'); #';
-
     printf "...";
 
     my $spawn= sub {