diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-11-21 12:52:45 -0800 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-11-21 12:52:45 -0800 |
commit | 4872ac2b9f0736d282877f45eaf0c075b4f0d587 (patch) | |
tree | b20478122a2288a864edac82de1b9ebd13ca4893 /templates/telnet | |
parent | cbc48cfdb8ecc8ba10b99167dbe67bde68eb24e8 (diff) | |
download | vyatta-op-4872ac2b9f0736d282877f45eaf0c075b4f0d587.tar.gz vyatta-op-4872ac2b9f0736d282877f45eaf0c075b4f0d587.zip |
allow <hostname|address> and fix path if vyatta-system not installed
Diffstat (limited to 'templates/telnet')
-rw-r--r-- | templates/telnet/node.tag/node.def | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/telnet/node.tag/node.def b/templates/telnet/node.tag/node.def index 258d014..3e0bf32 100644 --- a/templates/telnet/node.tag/node.def +++ b/templates/telnet/node.tag/node.def @@ -1,3 +1,6 @@ -help: telnet to <host> -allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} -run: shift; ${vyatta_sbindir}/telnet $* +help: telnet to <hostname|address> +allowed: echo -n HOSTNAME A.B.C.D X:X::X:X ; + sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} +run: test -x ${vyatta_sbindir}/telnet && + ${vyatta_sbindir}/telnet $2 $3 || + /usr/bin/telnet $2 $3 |