openrc: use ifquery -L for find_ifaces()
This commit is contained in:
parent
3b7181cf28
commit
89d84ec475
1 changed files with 1 additions and 4 deletions
5
dist/openrc/networking.initd
vendored
5
dist/openrc/networking.initd
vendored
|
@ -1,8 +1,5 @@
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
# note that the spoofprotect, syncoockies and ip_forward options are set in
|
|
||||||
# /etc/sysctl.conf
|
|
||||||
|
|
||||||
: ${cfgfile:="/etc/network/interfaces"}
|
: ${cfgfile:="/etc/network/interfaces"}
|
||||||
ifstate=/run/ifstate
|
ifstate=/run/ifstate
|
||||||
|
|
||||||
|
@ -24,7 +21,7 @@ find_ifaces() {
|
||||||
if [ -n "$single_iface" ]; then
|
if [ -n "$single_iface" ]; then
|
||||||
echo $single_iface
|
echo $single_iface
|
||||||
else
|
else
|
||||||
awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}' "$cfgfile"
|
ifquery -L -i "$cfgfile"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue