1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
# vim: set filetype=sh :
# file: example.ia_ssh
# copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2021)
# license: GNU General Public License, version 3
# description: test using ia_ssh with command given as one argument
# and as more arguments
# see also: test.ia_ssh
set -e
set -u
. ./ia
eval "$ia_init"
sshopts=""
while [ $# -gt 0 ]; do
if [ "$1" = "--sshopts" ]; then
sshopts="$2"
shift 2
else
cat <<END >&2
Usage: example_ssh [--sshopts <sshopts>]
END
exit 1
fi
done
ia_add "ia_ssh $<sshopts> localhost \"cd /tmp; pwd\""
ia_add "ia_ssh $<sshopts> localhost cd /tmp\; pwd"
ia_add "ia_ssh $<sshopts> localhost \"exit 7\""
ia
|