summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/tinc_setup
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2013-05-22 10:36:17 +0200
committermakefu <root@pigstarter.de>2013-05-22 10:36:42 +0200
commit5611bcc9425a27e0edb8158235d9e2ba646c3d69 (patch)
treeb170cbbd8d9ea7ed08438e08122321ed9701e2e1 /retiolum/scripts/tinc_setup
parent6969ff5928efce07a66c8b28bebc596918ce494a (diff)
new_install now uses the LOADER instead of ping to check if internet is available
Diffstat (limited to 'retiolum/scripts/tinc_setup')
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh10
1 files changed, 6 insertions, 4 deletions
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