chiark / gitweb /
: ${:=} not ${:=}
[autopkgtest.git] / xen / on-testbed
index aa5205137c303db4b7b7ed69d99ce6ac2e19f076..94af6bacb13abff17c2b22d9883998e60e3e4aa9 100755 (executable)
@@ -1,4 +1,17 @@
-#!/bin/sh
+#!/bin/bash
 set -e
-. ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/readconfig
-ssh -i $adt_sshkey $adt_guest_ipaddr "$@"
+. ${ADT_XENLVM_SHARE:=/usr/share/autopkgtest/xenlvm}/justconfig
+while test $# -gt $nonoptargs; do shift; done
+
+: "$1"
+
+case "$1" in
+--print-command)       ppfx=echo; r=root@; shift       ;;
+--print0-command)      ppfx=ppfx0; r=root@; shift      ;;
+--)                    shift                           ;;
+-*)                    fail "invalid instead-of-command options \`$1'" ;;
+esac
+
+ppfx0 () { for x in "$@"; do printf '%s\0' "$x"; done; }
+
+$ppfx ssh $adt_ssh_keyident_args $r$adt_guest_ipaddr "$@"