From 978087148d1165694584385dff4081fb0738ae14 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 12 Nov 2013 11:01:03 +0100 Subject: ship: fix telnet lib --- ship/lib/network | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ship') 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(){ -- cgit v1.2.3