adding more resiliancy to the ifup-public script. we want it to maybe fail if it doesn't know what to do with the variable. not just silently continue
This commit is contained in:
parent
13be20d519
commit
fb96f1daa8
|
@ -62,7 +62,11 @@ for IP in "${IPS[@]}"; do
|
|||
echo "we got IPv6 with prefix ${BASH_REMATCH[0]}"
|
||||
ip route add ${IP} dev ${IFACE} via $(eui64 $PUBLICMAC)
|
||||
|
||||
else ### don't know what we have but something we can't work with
|
||||
elif [[ $IP =~ ^\ *$ ]]; then
|
||||
echo "we just got an empty string. so not gonna do anything. probably due to splitting the comma"
|
||||
|
||||
else
|
||||
echo "Unable to detect with what prefix I'm working with"
|
||||
exit 10
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue