Commit 77da3827 authored by Natanael Copa's avatar Natanael Copa
Browse files

libalpine: available_ifaces: fallback to 'ip link' if /sys is not mounted

this makes it work in lxcontainers.
parent 5ceeeef2
......@@ -99,6 +99,10 @@ is_xen_dom0() {
# list of available network interfaces that aren't part of any bridge or bond
available_ifaces() {
local iflist= ifpath= iface= i=
if ! [ -d /sys/class/net ]; then
ip link | awk -F: '$1 ~ /^[0-9]+$/ {printf "%s",$2}'
for i in /sys/class/net/*/ifindex; do
[ -e "$i" ] || continue
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment