Manual control of network interfaces
I need to have Alpine boot with just the loopback configured in /etc/network/interfaces
and then manually start and stop other network interfaces as required. The eth0 wired interface works fine by just:
# ifconfig eth0 up
# udhcpc eth0
If I do the same commands as eth0 with wlan0, I get errors like #13795 (closed)
I'm using iwd to manage wireless network connections and have connected to the AP in question once to save it. If I add wlan0 to /etc/network/interfaces
and rc-service networking restart
that works but in order to not have wlan0 configured at boot, I don't want it in /etc/network/interfaces
right?
Looking at /etc/init.d/networking
I created a copy to /etc/init.d/networking.wlan0
in order to do rc-service networking.wlan0 restart
which works if I also hard code the cfgfile path. This line implies that you can pass it somehow but I haven't figured out how:
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/openrc/networking.initd#L6
Sorry, this is a bit of a ramble as I'm late to work but if anyone has "best practice" method to do this please let me know.