summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-08-27 13:14:32 +0000
committerdamien <damien@mandriva.com>2001-08-27 13:14:32 +0000
commit74752c92d4ccc1fc226cb4aa7ff0fa96d8d29b5a (patch)
treec979b21072177cd7b9ede4e95b44e4ee211a9244 /perl-install/network/network.pm
parentc2b1e260ea211c7880549b956565651bb7addd5a (diff)
downloaddrakx-74752c92d4ccc1fc226cb4aa7ff0fa96d8d29b5a.tar
drakx-74752c92d4ccc1fc226cb4aa7ff0fa96d8d29b5a.tar.gz
drakx-74752c92d4ccc1fc226cb4aa7ff0fa96d8d29b5a.tar.bz2
drakx-74752c92d4ccc1fc226cb4aa7ff0fa96d8d29b5a.tar.xz
drakx-74752c92d4ccc1fc226cb4aa7ff0fa96d8d29b5a.zip
added HWADDR
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 40f2e6053..98c3e285b 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -117,12 +117,15 @@ 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/; }
add2hash($intf, {
BROADCAST => join('.', mapn { int $_[0] | ~int $_[1] & 255 } \@ip, \@mask),
NETWORK => join('.', mapn { int $_[0] & $_[1] } \@ip, \@mask),
ONBOOT => bool2yesno(!member($intf->{DEVICE}, map { $_->{device} } detect_devices::probeall())),
+ HWADDR => $hwaddr
});
- setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT), ($intf->{wireless_eth}) ? qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV) : ());
+ setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR), ($intf->{wireless_eth}) ? qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV) : ());
}
sub add2hosts {