openrc: use ifquery -L for find_ifaces()

This commit is contained in:
Ariadne Conill 2020-10-14 02:38:05 -06:00
parent 3b7181cf28
commit 89d84ec475

View file

@ -1,8 +1,5 @@
#!/sbin/openrc-run
# note that the spoofprotect, syncoockies and ip_forward options are set in
# /etc/sysctl.conf
: ${cfgfile:="/etc/network/interfaces"}
ifstate=/run/ifstate
@ -24,7 +21,7 @@ find_ifaces() {
if [ -n "$single_iface" ]; then
echo $single_iface
else
awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}' "$cfgfile"
ifquery -L -i "$cfgfile"
fi
}