]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
ts-host-powercycle: Use a lighter-weight method if available
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 22 Jan 2019 17:51:50 +0000 (17:51 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 24 Jan 2019 18:40:21 +0000 (18:40 +0000)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
ts-host-powercycle

index 5c1698c7d236136052e71bf06d4f9d8ba1f814f9..79a3b7112e0cdd1ef17372c7a660c2d3bcf736ef 100755 (executable)
@@ -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);
 }