Skip to content

Commit

Permalink
Merge pull request #83 from Vogtinator/nolo
Browse files Browse the repository at this point in the history
Skip the lo interface when probing for DHCP
  • Loading branch information
Vogtinator authored Jul 9, 2021
2 parents b0effd2 + eb4d164 commit 29b865f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions files/usr/share/jeos-firstboot/jeos-firstboot-dialogs
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,19 @@ dialog_network()

shopt -s nullglob

for net_path in /sys/class/net/* ; do
test -f "$net_path" && continue # skip bonding_masters file
for net_path in /sys/class/net/*; do
[ -d "$net_path" ] || continue # skip bonding_masters file

net_device=${net_path##*/}

[ "$net_device" = "lo" ] && continue

# Only devices having ID_NET_NAME.* attrs
# Ignore errors if udev not available
udevadm info -q property -p "$net_path" 2>/dev/null | grep -qs ID_NET_NAME || continue
# But don't touch WLAN interfaces
udevadm info -q property -p "$net_path" | grep -qs "DEVTYPE=wlan" && continue

net_device=${net_path##*/}

unset IPADDR
eval `wicked test dhcp4 "$net_device" 2>/dev/null | grep -E "^IPADDR="`
ip link set down "$net_device" # set link down after probe once done
Expand Down

0 comments on commit 29b865f

Please sign in to comment.