summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2010-04-30 13:31:34 +0000
committerOlivier Blin <oblin@mandriva.com>2010-04-30 13:31:34 +0000
commit97230ea3bccd5d6a318b9b94f03e163abba26e03 (patch)
tree600820e95a9da646aa7a2c3366cb34a7e0184bc1
parent651b1d7697c58e7b275b161a8cdde697ff170949 (diff)
downloaddrakx-net-97230ea3bccd5d6a318b9b94f03e163abba26e03.tar
drakx-net-97230ea3bccd5d6a318b9b94f03e163abba26e03.tar.gz
drakx-net-97230ea3bccd5d6a318b9b94f03e163abba26e03.tar.bz2
drakx-net-97230ea3bccd5d6a318b9b94f03e163abba26e03.tar.xz
drakx-net-97230ea3bccd5d6a318b9b94f03e163abba26e03.zip
installer: configure automatic DHCP on all ethernet interfaces
(and not just if there is a unique ethernet interface)
-rw-r--r--NEWS2
-rw-r--r--lib/network/network.pm15
2 files changed, 8 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index dd838a8..a8be90a 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@
o add support for rt2870 driver
- allow to skip Interactive Firewall configuration if IFW is set to
no in /etc/sysconfig/drakx-net
+- installer: configure automatic DHCP on all ethernet interfaces
+ (and not just if there is a unique ethernet interface)
0.88:
- allow draknetprofile module selection to use whole screen.
diff --git a/lib/network/network.pm b/lib/network/network.pm
index 307b5b9..f88939b 100644
--- a/lib/network/network.pm
+++ b/lib/network/network.pm
@@ -779,20 +779,17 @@ sub easy_dhcp {
modules::load_category($modules_conf, list_modules::ethernet_categories());
my @all_dev = sort map { $_->[0] } network::connection::ethernet::get_eth_cards($modules_conf);
- #- only for a single ethernet network card
my @ether_dev = grep { /^eth[0-9]+$/ && `LC_ALL= LANG= $::prefix/sbin/ip -o link show $_ 2>/dev/null` =~ m|\slink/ether\s| } @all_dev;
- @ether_dev == 1 or return;
-
- my $dhcp_intf = $ether_dev[0];
- log::explanations("easy_dhcp: found $dhcp_intf");
-
- $net->{ifcfg}{$dhcp_intf} ||= {};
- put_in_hash($net->{ifcfg}{$dhcp_intf}, {
+ foreach my $dhcp_intf (@ether_dev) {
+ log::explanations("easy_dhcp: found $dhcp_intf");
+ $net->{ifcfg}{$dhcp_intf} ||= {};
+ put_in_hash($net->{ifcfg}{$dhcp_intf}, {
DEVICE => $dhcp_intf,
BOOTPROTO => 'dhcp',
NETMASK => '255.255.255.0',
ONBOOT => 'yes'
- });
+ });
+ }
1;
}