summaryrefslogtreecommitdiff
path: root/templates/telnet
diff options
context:
space:
mode:
Diffstat (limited to 'templates/telnet')
-rw-r--r--templates/telnet/node.tag/node.def9
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