Skip to content

Commit

Permalink
Merge pull request #9 from philregier/patch-1
Browse files Browse the repository at this point in the history
Possible workaround for changing interface names
  • Loading branch information
elgeoman authored Dec 5, 2018
2 parents 41e43d0 + 0cdb40e commit 35cae97
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion diags/network.t
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,20 @@ diag_plan $(($numtests))

for i in $(seq 0 $(($numdev - 1))); do
dev=${DIAG_NETWORK_DEV[$i]}
altname=${DIAG_NETWORK_ALTNAME[$i]}
mtu=${DIAG_NETWORK_MTU[$i]}
mode=${DIAG_NETWORK_MODE[$i]}
duplex=${DIAG_NETWORK_DUPLEX[$i]}
speed=${DIAG_NETWORK_SPEED[$i]}
if [ -d /sys/class/net/$dev ]; then
diag_ok "$dev exists"
else
diag_fail "$dev does not exst"
if [ -n "$altname" -a -d /sys/class/net/$altname ]; then
diag_ok "$altname found in place of $dev, proceeding"
dev=$altname
else
diag_fail "$dev does not exist"
fi
fi
if [ -n "$mtu" ]; then
gotmtu="$(getmtu $dev)"
Expand Down

0 comments on commit 35cae97

Please sign in to comment.