diff options
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/network.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 4b5049739..26e55beca 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -145,8 +145,10 @@ sub write_interface_conf { $intf->{HWADDR} &&= $mac_address; #- set HWADDR to MAC address if required #- write interface MAC address in iftab (if any) - my $descriptor = $link_type eq 'ether' ? 'mac' : 'unspec'; - substInFile { s/^$intf->{DEVICE}\s+.*\n//; $_ .= qq($intf->{DEVICE}\t$descriptor $mac_address\n) if eof } "$::prefix/etc/iftab" if $mac_address; + 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}; |