diff options
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r-- | perl-install/network/network.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 26e55beca..4be673b03 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -141,15 +141,10 @@ sub write_resolv_conf { sub write_interface_conf { my ($file, $intf, $_netc, $_prefix) = @_; - my ($link_type, $mac_address) = `LC_ALL= LANG= $::prefix/sbin/ip -o link show $intf->{DEVICE} 2>/dev/null` =~ m|.*link/(\S+)\s([0-9a-z:]+)\s|; + require network::ethernet; + my (undef, $mac_address) = network::ethernet::get_eth_card_mac_address($intf->{DEVICE}); $intf->{HWADDR} &&= $mac_address; #- set HWADDR to MAC address if required - #- write interface MAC address in iftab (if any) - my $descriptor = ${{ ether => 'mac', ieee1394 => 'mac_ieee1394' }}{$link_type}; - if ($mac_address && $descriptor) { - substInFile { s/^$intf->{DEVICE}\s+.*\n//; $_ .= qq($intf->{DEVICE}\t$descriptor $mac_address\n) if eof } "$::prefix/etc/iftab"; - } - my @ip = split '\.', $intf->{IPADDR}; my @mask = split '\.', $intf->{NETMASK}; |