diff options
author | Lassulus <lassulus@googlemail.com> | 2012-12-21 21:53:44 +0100 |
---|---|---|
committer | Lassulus <lassulus@googlemail.com> | 2012-12-21 21:53:44 +0100 |
commit | 19f1a122881503ca1266191496b639db3924a2de (patch) | |
tree | 04fc0ec01cd881ee02ff4d5f0925c6b8c1ff5141 /retiolum/scripts | |
parent | 668d0a3d27a0f911d3446fcc1e48eb32b2b0a83d (diff) |
added supernodes only for openwrt
Diffstat (limited to 'retiolum/scripts')
-rwxr-xr-x | retiolum/scripts/tinc_setup/new_install.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4de20223..adc355bd 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -121,10 +121,12 @@ get_hostname() #os autodetection find_os() { - if grep -qe '.*' /etc/*release 2>/dev/null; then + if grep -qei 'linux' /etc/*release 2>/dev/null; then OS=1 elif which getprop&>/dev/null; then OS=2 + elif grep -qe 'OpenWrt' /etc/*release 2>/dev/null; then + OS=3 fi } @@ -307,7 +309,12 @@ get_hostname $HOSTN mkdir -p $TINCDIR/$NETNAME cd $TINCDIR/$NETNAME -mv $TEMPDIR/hosts ./ +if [ $OS -eq 3 ]; then + $LOADER http://euer.krebsco.de/retiolum/supernodes.tar.gz | tar xz -C $TINCDIR/$NETNAME/hosts/ +else + mv $TEMPDIR/hosts ./ +fi + rm -r $TEMPDIR echo "Subnet = $IP4" > hosts/$HOSTN @@ -322,6 +329,7 @@ LocalDiscovery = yes AutoConnect = 3 #ConnectTos +ConnectTo = supernode ConnectTo = euer ConnectTo = pico EOF |