Allow options to be passed to ssh
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/petitboot.exp b/petitboot.exp
index 5477054..da51dae 100644
--- a/petitboot.exp
+++ b/petitboot.exp
@@ -2,7 +2,7 @@
set timeout 300
-spawn ssh -p2200 $argv
+spawn ssh -p2200 {*}[lrange $argv 0 end]
expect {
-ex "Petitboot" { exit }
diff --git a/reboot.sh b/reboot.sh
index ba674c0..162d8ed 100755
--- a/reboot.sh
+++ b/reboot.sh
@@ -2,7 +2,7 @@
set -euo pipefail
-CONNECT=$1
+CONNECT="$@"
i=0
@@ -11,7 +11,7 @@
echo Boot $i
ssh ${CONNECT} /usr/sbin/obmcutil poweron
- time expect petitboot.exp ${CONNECT}
+ time expect petitboot.exp -- ${CONNECT}
ssh ${CONNECT} /usr/sbin/obmcutil poweroff
sleep 20 # mboxd reload period. Remove when protocol v2 daemon is integrated