summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-08-27 16:54:16 +0000
committerdamien <damien@mandriva.com>2001-08-27 16:54:16 +0000
commit3b18e08492ede4590189018057c4d74c9eb511cb (patch)
tree41c01364d34d6a0ab52b55c28cc23d2b7c9ccbbc /perl-install
parentb706220ef9ea230f9537df5380507cee52c96333 (diff)
downloaddrakx-3b18e08492ede4590189018057c4d74c9eb511cb.tar
drakx-3b18e08492ede4590189018057c4d74c9eb511cb.tar.gz
drakx-3b18e08492ede4590189018057c4d74c9eb511cb.tar.bz2
drakx-3b18e08492ede4590189018057c4d74c9eb511cb.tar.xz
drakx-3b18e08492ede4590189018057c4d74c9eb511cb.zip
corrected hwaddr stuff
Diffstat (limited to 'perl-install')
-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 98c3e285b..51ade899c 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -117,8 +117,8 @@ sub write_interface_conf {
my @ip = split '\.', $intf->{IPADDR};
my @mask = split '\.', $intf->{NETMASK};
- my $hwaddr = -e $prefix/sbin/ip ? `LC_ALL= LANG= $prefix/sbin/ip -o link show $intf` : undef;
- if ($hwaddr) { chomp $hwaddr; $hwaddr =~ s/.*link\/ether\s([0-9a-z:]+)\s.*/$1/; }
+ my $hwaddr = -e $prefix/sbin/ip && `LC_ALL= LANG= $prefix/sbin/ip -o link show $intf->{DEVICE}`;
+ if($hwaddr) { chomp $hwaddr; $hwaddr =~ s/.*link\/ether\s([0-9a-z:]+)\s.*/$1/; }
add2hash($intf, {
BROADCAST => join('.', mapn { int $_[0] | ~int $_[1] & 255 } \@ip, \@mask),
NETWORK => join('.', mapn { int $_[0] & $_[1] } \@ip, \@mask),