echo"Missing some configuration files in ${path}, you can generate a valid configuration using grdn-cfg command. Exiting."
exit 1
fi
fi
# setup
# firewall configuration
# TODO check if not already accepted
# TODO only forward what comes from re6st
ip6tables -P FORWARD ACCEPT
ip6tables -A OUTPUT -p udp --dport 6696 -j ACCEPT
ip6tables -A OUTPUT -p udp --dport 326 -j ACCEPT
ip6tables -A INPUT -p udp --dport 6696 -j ACCEPT
ip6tables -A INPUT -p udp --dport 326 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 9684 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 50005 -j ACCEPT
# TODO: how to get environment variables used by shill upstart script/shill options
# setup shill network manager
read-p"Was the network manager shill already started with the right blacklisted devices? (It should be the case if you run this script since you boot. Answering n will restart shill.) [y/N]? " confirm
if["$confirm"!="y"-a"$confirm"!="Y"];then
if[[$( status shill_respawn | grep running )]];then
# shill_respawn job does not allow to pass arguments to shill
stop shill_respawn
fi
if[[$( status shill | grep running )]];then
stop shill
fi
start shill ${shill_options}
fi
# TODO get interface name with netstat -i
read-p"Should the interface accept router advertisement via IPv6 [y/N]? " accept_ra