Simplified use4andor6 logic.

This commit is contained in:
ryt51V 2016-02-27 20:19:24 +00:00
parent 7fb7df7f6e
commit 443fe43ecc

View file

@ -191,24 +191,21 @@ use4andor6() {
esac esac
done done
if [ $useIPv4 ] && [ ! $useIPv6 ]; then if [ $useIPv4 ]; then
getStaticIPv4Settings getStaticIPv4Settings
setStaticIPv4 setStaticIPv4
echo "::: Using IPv4 on $IPv4addr" echo "::: Using IPv4 on $IPv4addr"
else
echo "::: Using IPv6 on $piholeIPv6"
fi
if [ $useIPv6 ]; then
useIPv6dialog
echo "::: Using IPv6 on $piholeIPv6"
else
echo "::: IPv6 will NOT be used." echo "::: IPv6 will NOT be used."
fi fi
if [ ! $useIPv4 ] && [ $useIPv6 ]; then
useIPv6dialog
echo "::: IPv4 will NOT be used."
echo "::: Using IPv6 on $piholeIPv6"
fi
if [ $useIPv4 ] && [ $useIPv6 ]; then
getStaticIPv4Settings
setStaticIPv4
useIPv6dialog
echo "::: Using IPv4 on $IPv4addr"
echo "::: Using IPv6 on $piholeIPv6"
fi
if [ ! $useIPv4 ] && [ ! $useIPv6 ]; then if [ ! $useIPv4 ] && [ ! $useIPv6 ]; then
echo "::: Cannot continue, neither IPv4 or IPv6 selected" echo "::: Cannot continue, neither IPv4 or IPv6 selected"
echo "::: Exiting" echo "::: Exiting"