contrib/meshwizard: Only setup 6and4 for olsrd if ipv6 is available
authorManuel Munz <freifunk@somakoma.de>
Wed, 27 Jun 2012 17:54:16 +0000 (17:54 +0000)
committerManuel Munz <freifunk@somakoma.de>
Wed, 27 Jun 2012 17:54:16 +0000 (17:54 +0000)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh
contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh

index d53fc38..306cf94 100755 (executable)
@@ -33,7 +33,7 @@ handle_interfacedefaults() {
 config_foreach handle_interfacedefaults InterfaceDefaults
 
 # Set basic olsrd settings
-if [ "$profile_ipv6" = 1 ]; then
+if [ "$profile_ipv6" = 1 ] && [ "$has_ipv6" == "1" ]; then
        uci set olsrd.olsrd.IpVersion="6and4"
 fi
 uci_commitverbose "Setup olsr basic settings" olsrd
index 859d5ff..f159268 100755 (executable)
@@ -18,7 +18,7 @@ echo "
 # config
 export dir="/usr/bin/meshwizard"
 . $dir/functions.sh
-[ -f /proc/net/ipv6_route ] && has_ipv6=1
+[ -f /proc/net/ipv6_route ] && export has_ipv6=1
 
 # Check which packages we have installed
 export has_luci=FALSE