summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-13 02:05:32 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-13 02:05:32 +0000
commit7c3fe363be7f427ce33b12186c1b961cc00998ec (patch)
tree2e15ca2d410efa6b6c98eab9da2b557794a46c70 /perl-install/network/network.pm
parentccb354df46579b55cfe8521cf30fbf007d69f933 (diff)
downloaddrakx-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar
drakx-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar.gz
drakx-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar.bz2
drakx-7c3fe363be7f427ce33b12186c1b961cc00998ec.tar.xz
drakx-7c3fe363be7f427ce33b12186c1b961cc00998ec.zip
(write_interface_conf) do not write undefined MAC address in iftab
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm4
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};