From 5611bcc9425a27e0edb8158235d9e2ba646c3d69 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 22 May 2013 10:36:17 +0200 Subject: new_install now uses the LOADER instead of ping to check if internet is available --- retiolum/scripts/tinc_setup/new_install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'retiolum') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index bd057cf8..6f3739a9 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -121,9 +121,9 @@ find_os() } find_telnet(){ - if command -v telnet >/dev/null;then + if exists elnet >/dev/null;then TELNET="`command -v telnet`" - elif command -v busybox >/dev/null;then + elif exists busybox >/dev/null;then TELNET="`command -v busybox` telnet" else echo "cannot find telnet binary, please install either telnet-client or busybox" @@ -164,13 +164,15 @@ if ! exists curl ; then exit 1 else LOADER='wget -O-' + HEAD_LOADER="$LOADER --spider" fi else LOADER=curl + HEAD_LOADER=$LOADER -I fi -if ! $(ping -c 1 -W 5 euer.krebsco.de 1>/dev/null) ;then - echo "Cant reach euer, check if your internet is working" +if ! $HEAD_LOADER $SURL >;then + echo "Cannot find supernode package, check if your internet is working" exit 1 fi -- cgit v1.2.3