diff options
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r-- | perl-install/network.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm index ea033003a..80e4e4524 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -272,6 +272,7 @@ sub configureNetwork { #- } $last or return; if ($last->{BOOTPROTO} =~ /^(dhcp|bootp)$/) { + $netc->{NET_DEVICE} = $last->{DEVICE}; $netc->{minus_one} = 1; my $dhcp_hostname = $netc->{HOSTNAME}; $::isInstall and $in->set_help('configureNetworkHostDHCP'); @@ -288,6 +289,17 @@ such as ``mybox.mylab.myco.com''."), unlink "$prefix/etc/sysconfig/network-scripts/net_cnx_up"; unlink "$prefix/etc/sysconfig/network-scripts/net_cnx_down"; undef $netc->{NET_DEVICE}; + foreach (@l) { + $intf->{$device}{IPADDR} =~ $ip_regexp; + my $ip1=$1; my $ip2=$2; my $ip3=$3; my $ip4=$4; + $intf->{$device}{NETMASK} =~ $ip_regexp; + my $m1=$1; my $m2=$2; my $m3=$3; my $m4=$4; + $ip1&=$m1; $ip2&=$m2; $ip3&=$m3; $ip4&=$m4; + $netc->{GATEWAY} =~ $ip_regexp; + my $g1=$1; my $g2=$2; my $g3=$3; my $g4=$4; + $g1&=$m1; $g2&=$m2; $g3&=$m3; $g4&=$m4; + $netc->{NET_DEVICE} = $_ if ($g1==$ip1 && $g2==$ip2 && $g3==$ip3); + } } } miscellaneousNetwork($in); |