diff options
-rw-r--r-- | templates/telnet/node.tag/node.def | 10 | ||||
-rw-r--r-- | templates/telnet/node.tag/node.tag/node.def | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/templates/telnet/node.tag/node.def b/templates/telnet/node.tag/node.def index 5bcce24..f52266b 100644 --- a/templates/telnet/node.tag/node.def +++ b/templates/telnet/node.tag/node.def @@ -1,5 +1,9 @@ help: telnet to <hostname|address> allowed: vyatta-allowed-hosts -run: test -x ${vyatta_sbindir}/telnet && - ${vyatta_sbindir}/telnet $2 $3 || - /usr/bin/telnet $2 $3 +run: if [ -x /usr/bin/telnet ] ; then + /usr/bin/$* + elif [ -x /bin/busybox ] ; then + /bin/busybox $* + else + echo telnet not found + fi diff --git a/templates/telnet/node.tag/node.tag/node.def b/templates/telnet/node.tag/node.tag/node.def index 4e0c65e..95bffe8 100644 --- a/templates/telnet/node.tag/node.tag/node.def +++ b/templates/telnet/node.tag/node.tag/node.def @@ -1,5 +1,9 @@ help: telnet to <hostname|address> <port|service> allowed: echo -n '<PORT>' -run: test -x ${vyatta_sbindir}/telnet && - ${vyatta_sbindir}/telnet $2 $3 || - /usr/bin/telnet $2 $3 +run: if [ -x /usr/bin/telnet ] ; then + /usr/bin/$* + elif [ -x /bin/busybox ] ; then + /bin/busybox $* + else + echo telnet not found + fi |