Advice wanted.
On a Unifi USG I want the default 192.168.1.1 to not be assigned, so we don't break the gateway bridge and play with subnets to reach LuCi.
That means the USB has been flashed and looking for a way to set this IP before install.
/etc/config/network does not exist, guessing that is generated first run.
Only mention of 192.168.1.1 is in /bin/config/generate (quick VSCode search).
case "$1" in
lan) ipad=${ipaddr:-"192.168.1.1"} ;;
*) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;;
esac
You should always set the address to something deterministic, so if you want to change the address, make sure you have an unused IP address that is not within your DHCP pool. Maybe 192.168.1.2.
Keep in mind that you also need to specify the IP with CIDR notation (192.168.1.2/24) starting with 25.12.
You can put this change into a first boot script that will run when your device is setting up for the first time after it's been flashed (or reset). This is easy to do using the firmware-selector.
I completely missed the boot script generator. Cool!
Also... if you're doing this to allow non-overlapping connection to an existing network, be sure to disable the DHCP server by adding the ignore option to the lan DHCP server.
Remember -- whatever you do here will become the default from this point forward. Document what you've done and maybe even attach it as a post-it or sticker to the device itself so that you have these details in the event you need to debug the device/network in an emergency situation.