add -b for pointing to the telnet program. from <mikan@mikan.net>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10151 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-06-21 13:36:12 +00:00
parent d9eca070e3
commit 7f9fd0b549

View File

@@ -1,7 +1,8 @@
#!/bin/sh #!/bin/sh
# $Id$ # $Id$
# #
usage="Usage: $0 [-l username] [-k] [-t args_to_telnet] [-x args_to_xterm] [-w term_emulator] [-n] [-v] [-h | --help] [--version] host [port]" usage="Usage: $0 [-l username] [-k] [-t args_to_telnet] [-x args_to_xterm] [-w term_emulator] [-b telnet_binary] [-n] [-v] [-h | --help] [--version] host [port]"
binary=telnet
term= term=
kx_args=-P kx_args=-P
while true while true
@@ -13,6 +14,7 @@ do
-k) kx_args="${kx_args} -k"; shift;; -k) kx_args="${kx_args} -k"; shift;;
-n) term=none; shift;; -n) term=none; shift;;
-w) term=$2; shift 2;; -w) term=$2; shift 2;;
-b) binary=$2; shift 2;;
--version) echo "$0: %PACKAGE% %VERSION%"; exit 0;; --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;;
-h) echo $usage; exit 0;; -h) echo $usage; exit 0;;
--help) echo $usage; exit 0;; --help) echo $usage; exit 0;;
@@ -54,10 +56,10 @@ if test -z "$term"; then
done done
done done
fi fi
test "$verb" && echo "Telnet command used is `type telnet`." test "$verb" && echo "Telnet command used is `type $binary`."
if test -n "$term" -a "$term" != "none"; then if test -n "$term" -a "$term" != "none"; then
($term -title $title -n $title $xterm_args -e env DISPLAY=$disp XAUTHORITY=$auth telnet -D $telnet_args $host $port; kill -USR2 $pid) & ($term -title $title -n $title $xterm_args -e env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port; kill -USR2 $pid) &
else else
env DISPLAY=$disp XAUTHORITY=$auth telnet -D $telnet_args $host $port env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port
kill -USR2 $pid kill -USR2 $pid
fi fi