From: Ian Jackson Subject: [OSSTEST PATCH 17/32] cr-ensure-disk-space: Break out ontarget Date: Tue, 24 Mar 2015 19:02:40 +0000 Message-ID: <1427223775-8592-18-git-send-email-ian.jackson@eu.citrix.com> References: <1427223775-8592-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaU6b-00006Y-K0 for xen-devel@lists.xenproject.org; Tue, 24 Mar 2015 19:03:13 +0000 In-Reply-To: <1427223775-8592-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org No functional change. Signed-off-by: Ian Jackson --- cr-ensure-disk-space | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index ff07b76..31880f7 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -53,6 +53,12 @@ our @sshopts= qw(-o batchmode=yes); $c{LogsPublish} =~ m/\:/ or die "$c{LogsPublish} ?"; my ($pubhost, $pubdir) = ($`,$'); #'; +sub ontarget ($) { + my ($shellcmd) = @_; + # returns list to run that command + return qw(ssh -n), @sshopts, $pubhost, $shellcmd; +} + for (;;) { open P, "df --block-size=1M -P . |" or die $!; $_=

; @@ -91,7 +97,7 @@ for (;;) { my $spawn= sub { $!=0; my $r= system @_; die "@_ $r $!" if $r; }; - $spawn->(qw(ssh -n), @sshopts, $pubhost, <(ontarget <