Commit 03e2bd7e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minot clean to avoid warnings in containers.

parent 9ff27b0c
...@@ -643,6 +643,10 @@ sub os_ifconfig_line($$$$$$$$;$$$) ...@@ -643,6 +643,10 @@ sub os_ifconfig_line($$$$$$$$;$$$)
# #
# Need to check units on the speed. Just in case. # Need to check units on the speed. Just in case.
# #
if (!defined($speed)) {
warn("*** No speed defined, default to 100Mbps\n");
$speed = 100;
}
if ($speed =~ /(\d*)([A-Za-z]*)/) { if ($speed =~ /(\d*)([A-Za-z]*)/) {
if ($2 eq "Mbps") { if ($2 eq "Mbps") {
$speed = $1; $speed = $1;
...@@ -676,6 +680,10 @@ sub os_ifconfig_line($$$$$$$$;$$$) ...@@ -676,6 +680,10 @@ sub os_ifconfig_line($$$$$$$$;$$$)
$media = $IFC_100MBS; $media = $IFC_100MBS;
} }
} }
if (!defined($duplex)) {
warn("*** No duplex defined, default to full\n");
$duplex = "full";
}
if ($duplex eq "full") { if ($duplex eq "full") {
$media = "$media-$IFC_FDUPLEX"; $media = "$media-$IFC_FDUPLEX";
} }
......
Supports Markdown
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