contrib/meshwizard: check if ipv6 is available on the system

This commit is contained in:
Manuel Munz 2012-06-27 16:13:56 +00:00
parent e2dd594c38
commit b6cd0f852b

View file

@ -12,12 +12,13 @@
. /lib/functions.sh . /lib/functions.sh
echo " echo "
/* Meshwizard 0.0.7 */ /* Meshwizard 0.0.8 */
" "
# config # config
export dir="/usr/bin/meshwizard" export dir="/usr/bin/meshwizard"
. $dir/functions.sh . $dir/functions.sh
[ -f /proc/net/ipv6_route ] && has_ipv6=1
# Check which packages we have installed # Check which packages we have installed
export has_luci=FALSE export has_luci=FALSE
@ -67,7 +68,7 @@ if [ "$lan_proto" == "static" ] && [ -n "$lan_ip4addr" ] && [ -n "$lan_netmask"
$dir/helpers/setup_lan_static.sh $dir/helpers/setup_lan_static.sh
fi fi
if [ "$profile_ipv6" == 1 ]; then if [ "$profile_ipv6" == 1 ] && [ "$has_ipv6" = 1 ]; then
$dir/helpers/setup_lan_ipv6.sh $dir/helpers/setup_lan_ipv6.sh
# Setup auto-ipv6 # Setup auto-ipv6
if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
@ -101,7 +102,7 @@ for net in $networks; do
$dir/helpers/setup_splash.sh $net $dir/helpers/setup_splash.sh $net
$dir/helpers/setup_firewall_interface.sh $net $dir/helpers/setup_firewall_interface.sh $net
if [ "$profile_ipv6" == 1 ]; then if [ "$profile_ipv6" == 1 ] && [ "$has_ipv6" = 1 ]; then
$dir/helpers/setup_radvd_interface.sh $net $dir/helpers/setup_radvd_interface.sh $net
fi fi
done done