From: Ian Jackson Date: Tue, 22 Jan 2019 17:51:50 +0000 (+0000) Subject: ts-host-powercycle: Use a lighter-weight method if available X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a4e9b64ffeac440ce65b06efc093eca7e9e8111a;p=people%2Froyger%2Fosstest.git ts-host-powercycle: Use a lighter-weight method if available Signed-off-by: Ian Jackson --- diff --git a/ts-host-powercycle b/ts-host-powercycle index 5c1698c..79a3b71 100755 --- a/ts-host-powercycle +++ b/ts-host-powercycle @@ -33,8 +33,10 @@ our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); +my $approach_re = qr{(?!.*SSH)}; + if (defined $only) { - power_state($ho, $only); + power_state($ho, $only, $approach_re); } else { - power_cycle($ho); + power_cycle($ho, $approach_re); }