# Special thanks to bittorf wireless ))
START=65
-OLSRD_OLSRD_SCHEMA='ignore:internal config_file:internal DebugLevel=0 IpVersion=4 AllowNoInt:bool=1 Pollrate=0.025 TcRedundancy=2 MprCoverage=3 LinkQualityFishEye=1 LinkQualityWinSize=100 LinkQualityDijkstraLimit=0+9.0 LinkQualityLevel=2 UseHysteresis:bool=0 FIBMetric=flat ClearScreen:bool=1 Willingness=3 LinkQualityAging=0.1 LinkQualityAlgorithm=etx_fpm'
+OLSRD_OLSRD_SCHEMA='ignore:internal config_file:internal DebugLevel=0'
OLSRD_IPCCONNECT_SCHEMA='ignore:internal Host:list Net:list2'
OLSRD_LOADPLUGIN_SCHEMA='ignore:internal library:internal Host4:list Net4:list2 Host:list Net:list2 Host6:list Net6:list2 Ping:list redistribute:list NonOlsrIf:list name:list lat lon latlon_infile HNA:list2 hosts:list2'
-OLSRD_INTERFACE_SCHEMA='ignore:internal interface:internal AutoDetectChanges:bool Ip4Broadcast=255.255.255.255 HelloInterval=2.0 HelloValidityTime=40.0 TcInterval=5.0 TcValidityTime=100.0 MidInterval=18.0 MidValidityTime=324.0 HnaInterval=18.0 HnaValidityTime=108.0'
+OLSRD_INTERFACE_SCHEMA='ignore:internal interface:internal AutoDetectChanges:bool'
T=' '
N='
fi
[ "$HNA4_COUNT" -le 0 ] && echo -n "${N}Hna4${N}{"
- echo -n "${N}${T}$netaddr $netmask"
+ echo -n "${N}${T}${T}$netaddr $netmask"
HNA4_COUNT=$((HNA4_COUNT + 1))
return 0
fi
[ "$HNA6_COUNT" -le 0 ] && echo -n "${N}Hna6${N}{"
- echo -n "${N}${T}$netaddr $prefix"
+ echo -n "${N}${T}${T}$netaddr $prefix"
HNA6_COUNT=$((HNA6_COUNT + 1))
return 0
if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then
bindv6only="$(sysctl -n net.ipv6.bindv6only)"
sysctl -w net.ipv6.bindv6only=1
- fi
-
- olsrd -f "$OLSRD_CONFIG_FILE" -nofork < /dev/null > /dev/null &
+ sed -e 's/^\t\t[0-9.]*[ ][0-9.]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6
+ olsrd -f /var/etc/olsrd.conf.ipv6 -nofork < /dev/null > /dev/null &
- if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then
- sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
+ sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' -e 's/^\t\t[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:]*[ ][0-9]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
olsrd -f /var/etc/olsrd.conf.ipv4 -nofork < /dev/null > /dev/null &
sleep 3
sysctl -w net.ipv6.bindv6only="$bindv6only"
+ else
+ olsrd -f "$OLSRD_CONFIG_FILE" -nofork < /dev/null > /dev/null &
fi
}