Add undocumented avoid_static_ip flag

This commit is contained in:
Chris 2018-05-19 16:47:58 +02:00 committed by GitHub
parent 548492832d
commit c0b43f3b7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,7 @@ c=$(( c < 70 ? 70 : c ))
skipSpaceCheck=false skipSpaceCheck=false
reconfigure=false reconfigure=false
runUnattended=false runUnattended=false
skipStaticIpSetup=false
# Find IP used to route to outside world # Find IP used to route to outside world
@ -1286,6 +1287,7 @@ main() {
"--reconfigure" ) reconfigure=true;; "--reconfigure" ) reconfigure=true;;
"--i_do_not_follow_recommendations" ) skipSpaceCheck=false;; "--i_do_not_follow_recommendations" ) skipSpaceCheck=false;;
"--unattended" ) runUnattended=true;; "--unattended" ) runUnattended=true;;
"--avoid_static_ip" ) skipStaticIpSetup=true;;
esac esac
done done
@ -1324,7 +1326,7 @@ main() {
chooseInterface chooseInterface
# Only try to set static on Raspbian, otherwise let user do it # Only try to set static on Raspbian, otherwise let user do it
if [[ $PLAT != "Raspbian" ]]; then if [[ $PLAT != "Raspbian" ]] || [[ "${skipStaticIpSetup}" == true ]]; then
avoidStaticIPv4Ubuntu avoidStaticIPv4Ubuntu
else else
getStaticIPv4Settings getStaticIPv4Settings