summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}