2017-04-30 23:34:55 +00:00
|
|
|
# $OpenBSD: host-expand.sh,v 1.5 2017/04/30 23:34:55 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
|
|
|
|
|
2017-04-30 23:34:55 +00:00
|
|
|
${SSH} -F $OBJ/ssh_proxy somehost true >$OBJ/actual
|
|
|
|
diff $OBJ/expect $OBJ/actual || fail "$tid"
|
2011-01-06 22:54:20 +00:00
|
|
|
|