ifupdown-ng-openrc causes system to not respect "auto" (or lack thereof) keyword in /etc/network/interfaces
I've noticed this because one of my systems stopped starting properly. It hangs on boot up while trying to bring up /etc/init.d/networking up. It waits on a DNS for a wireguard interface that is not intended to be configured on startup automatically (no "auto" keyword).
The deadlock is a separate problem: my system uses dhcpcd+dnsmasq for dns, but dnsmasq requires net, and if dns is required while starting net, then it's stuck -- which the regression causes the system to hit now.
Upon checking I've found that ifupdown-ng-openrc changed /etc/init.d/networking. See below example comparing the original one with the new one in how they handle find_ifaces()
:
$ printf 'auto lo\niface lo inet loopback\n\nauto eth0\niface eth0 inet6 auto\n\niface eth1 inet6 auto\n' | ifquery -L -i /dev/stdin; echo
lo
eth0
eth1
$ printf 'auto lo\niface lo inet loopback\n\nauto eth0\niface eth0 inet6 auto\n\niface eth1 inet6 auto\n' | awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}'; echo
lo eth0
According to a man page I've found1 ifquery should list only auto interfaces:
-l, --list
For ifquery, list all the interfaces which match the specified class. If no class specified, prints all the interfaces listed as auto.
I guess ifupdown-ng itself would have its ifquery fixed to adhere to this.