From 1b60fd6147dd879b21289c3882a9bd2cb4d6cee5 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 12 Jun 2013 13:54:52 +0200 Subject: [PATCH] run: power off only the port which was switched on --- tool/run | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tool/run b/tool/run index fdfd55c656..619a782df3 100755 --- a/tool/run +++ b/tool/run @@ -655,13 +655,12 @@ rename exit power_plug_off_exit proc exit {{status 0}} { global run_target if {[regexp "reset" $run_target]} { + set power_port [get_cmd_arg --reset-port 1] set connection_id [power_plug_connect] - for { set i 0 } { $i < 4 } { incr i } { - puts "switch port $i off" - send -i $connection_id "port $i 0\n" - expect -i $connection_id "250 OK" - } + puts "switch port $power_port off" + send -i $connection_id "port $power_port 0\n" + expect -i $connection_id "250 OK" } power_plug_off_exit $status