2014-02-27 23:34:03 +00:00
|
|
|
# $OpenBSD: host-expand.sh,v 1.3 2014/02/27 23:17:41 djm Exp $
|
2011-01-06 22:54:20 +00:00
|
|
|
# Placed in the Public Domain.
|
|
|
|
|
|
|
|
tid="expand %h and %n"
|
|
|
|
|
|
|
|
echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
|
|
|
|
printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
|
|
|
|
|
2011-01-10 20:56:26 +00:00
|
|
|
cat >$OBJ/expect <<EOE
|
2011-01-06 22:54:20 +00:00
|
|
|
somehost
|
|
|
|
127.0.0.1
|
|
|
|
EOE
|
|
|
|
|
|
|
|
for p in 1 2; do
|
|
|
|
verbose "test $tid: proto $p"
|
2011-01-10 20:56:26 +00:00
|
|
|
${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
|
|
|
|
diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
|
2011-01-06 22:54:20 +00:00
|
|
|
done
|
|
|
|
|