diff options
author | makefu <github@syntax-fehler.de> | 2013-11-12 11:01:03 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-11-12 11:01:03 +0100 |
commit | 978087148d1165694584385dff4081fb0738ae14 (patch) | |
tree | 9da1e3424ef6c9f9d8ffa1bcdeedafb5c8d77aaa /ship | |
parent | 9210cdcdd8f9b7cf1bc48dcc01914b1d2530820d (diff) |
ship: fix telnet lib
Diffstat (limited to 'ship')
-rw-r--r-- | ship/lib/network | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ship/lib/network b/ship/lib/network index 0e494514..74edcbac 100644 --- a/ship/lib/network +++ b/ship/lib/network @@ -46,15 +46,16 @@ which_telnet(){ # netcat # busybox telnet if [ -e "${TELNET:-does_not_exist}" ]; then - info"Will be using $TELNET as Telnet Client" + info "Will be using $TELNET as Telnet Client" + echo $TELNET elif exists telnet ;then - TELNET="$(command -v telnet)" + command -v telnet elif exists nc ;then - TELNET="$(command -v nc)" + command -v nc elif exists netcat;then - echo "$(command -v netcat)" + command -v netcat elif exists busybox;then - echo "$(command -v busybox) telnet" + echo `command -v busybox` telnet else error "Cannot find telnet binary, please install either telnet-client or busybox or netcat or provided TELNET environment.\nbailing out!" return 1 @@ -64,7 +65,7 @@ which_telnet(){ run_telnet(){ host="$1" port="$2" - $(which_telnet) $host $port + $(which_telnet) "$host" "$port" } send_irc(){ |