summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-12 13:40:54 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-12 13:40:54 +0000
commitacce4e2729f23dd62169a52195cba302c4f54f08 (patch)
treea916502a8d6b2af7c6bf68370c3f8010131b71bc /perl-install/network/network.pm
parent2a549efe0a9fddecad1903f81a4742abd5149e45 (diff)
downloaddrakx-acce4e2729f23dd62169a52195cba302c4f54f08.tar
drakx-acce4e2729f23dd62169a52195cba302c4f54f08.tar.gz
drakx-acce4e2729f23dd62169a52195cba302c4f54f08.tar.bz2
drakx-acce4e2729f23dd62169a52195cba302c4f54f08.tar.xz
drakx-acce4e2729f23dd62169a52195cba302c4f54f08.zip
write interface MAC address in iftab
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index ac3f3f64d..44e665ad3 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -144,6 +144,9 @@ 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";
+
my @ip = split '\.', $intf->{IPADDR};
my @mask = split '\.', $intf->{NETMASK};