From a4e9b64ffeac440ce65b06efc093eca7e9e8111a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 22 Jan 2019 17:51:50 +0000 Subject: [PATCH] ts-host-powercycle: Use a lighter-weight method if available Signed-off-by: Ian Jackson --- ts-host-powercycle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts-host-powercycle b/ts-host-powercycle index 5c1698c7..79a3b711 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); } -- 2.39.5