diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-13 02:05:32 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-13 02:05:32 +0000 |
commit | 7c3fe363be7f427ce33b12186c1b961cc00998ec (patch) | |
tree | 2e15ca2d410efa6b6c98eab9da2b557794a46c70 /perl-install | |
parent | ccb354df46579b55cfe8521cf30fbf007d69f933 (diff) | |
download | drakx-backup-do-not-use-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar drakx-backup-do-not-use-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar.gz drakx-backup-do-not-use-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar.bz2 drakx-backup-do-not-use-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar.xz drakx-backup-do-not-use-7c3fe363be7f427ce33b12186c1b961cc00998ec.zip |
(write_interface_conf) do not write undefined MAC address in iftab
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/network.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 44e665ad3..146619e07 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -144,8 +144,8 @@ sub write_interface_conf { my ($mac_address) = `LC_ALL= LANG= $::prefix/sbin/ip -o link show $intf->{DEVICE} 2>/dev/null` =~ m|.*link/ether\s([0-9a-z:]+)\s|; $intf->{HWADDR} &&= $mac_address; #- set HWADDR to MAC address if required - #- write interface MAC address in iftab - substInFile { s/^$intf->{DEVICE}\s+.*\n//; $_ .= qq($intf->{DEVICE}\t$mac_address\n) if eof } "$::prefix/etc/iftab"; + #- write interface MAC address in iftab (if any) + substInFile { s/^$intf->{DEVICE}\s+.*\n//; $_ .= qq($intf->{DEVICE}\t$mac_address\n) if eof } "$::prefix/etc/iftab" if $mac_address; my @ip = split '\.', $intf->{IPADDR}; my @mask = split '\.', $intf->{NETMASK}; |