#!/bin/bash
set -e
. ${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 "$@"
