diff options
Diffstat (limited to 'retiolum/scripts')
| -rwxr-xr-x | retiolum/scripts/routing/defaultroute.sh | 16 | ||||
| -rwxr-xr-x | retiolum/scripts/tinc_setup/install.sh | 7 | 
2 files changed, 7 insertions, 16 deletions
| diff --git a/retiolum/scripts/routing/defaultroute.sh b/retiolum/scripts/routing/defaultroute.sh index b7d703e8..f5a1a465 100755 --- a/retiolum/scripts/routing/defaultroute.sh +++ b/retiolum/scripts/routing/defaultroute.sh @@ -7,7 +7,7 @@ usage()      echo "-d       deactivate routing"  } -defaultroute=$(route -n | grep 'UG[ \t]' | awk '{print $2}') +defaultroute=$(ip route show | grep default | awk '{ print $3 }')  tincdir="/etc/tinc/retiolum"  if [[ $(id -u) -gt 0 ]]; then @@ -30,17 +30,9 @@ case "$1" in          exit 1;;  esac - -cat $tincdir/hosts/* | grep Address | cut -b 11- | +cat $tincdir/tinc.conf | grep ConnectTo | cut -b 13- |  while read host  do -    if [ "$(echo $host | sed 's/[0-9]*//g' | sed 's/>//g')" = '' ]; then -        route $command $host gw $defaultroute -    else -        host -4 $host | grep "has address" | awk '{ print $4 }' | -        while read addr -        do -            route $command $addr gw $defaultroute && echo "$command routing to $addr via $defaultroute" -        done -    fi +    addr=$(cat $tincdir/hosts/$host | grep Address | cut -b 11-) +    echo route $command $addr gw $defaultroute  done diff --git a/retiolum/scripts/tinc_setup/install.sh b/retiolum/scripts/tinc_setup/install.sh index 1cd7c81d..a6b50b8a 100755 --- a/retiolum/scripts/tinc_setup/install.sh +++ b/retiolum/scripts/tinc_setup/install.sh @@ -39,7 +39,7 @@ then    # myipv4=$(echo 42.$(for i in `seq 1 3`; do echo "ibase=16;`bin/fillxx xx|tr [a-f] [A-F]`" | bc; done)|tr \  .)/32    myipv4="${2:-}" -  mynet4=42.0.0.0 +  mynet4=10.243.0.0    if [ ! "$myipv4" ]     then @@ -50,7 +50,7 @@ then        printf 'select unused v4 subnet ip (1-255): '        read v4num      done -    myipv4="42.0.0.$v4num" +    myipv4="10.243.0.$v4num"    fi    echo "Subnet = $myipv4" > hosts/$myname @@ -62,8 +62,7 @@ fi  cat>tinc.conf<<EOF  Name = $myname -ConnectTo = EUcancER -ConnectTo = kaah +ConnectTo = euer  ConnectTo = oxberg  ConnectTo = pa_sharepoint  ConnectTo = supernode | 
