diff options
-rw-r--r-- | perl-install/install_steps.pm | 2 | ||||
-rw-r--r-- | perl-install/network.pm | 10 | ||||
-rwxr-xr-x | perl-install/standalone/draknet | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 59ee51fac..4f1f7ebcc 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -498,7 +498,7 @@ sub selectMouse($) { sub configureNetwork { my ($o) = @_; require network; - network::configureNetwork2($o->{prefix}, $o->{netc}, $o->{intf}, sub { $o->pkg_install(@_) }); + network::configureNetwork2($o, $o->{prefix}, $o->{netc}, $o->{intf}, sub { $o->pkg_install(@_) }); } #------------------------------------------------------------------------------ diff --git a/perl-install/network.pm b/perl-install/network.pm index 779e6a7e5..82c1a6cf4 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -455,7 +455,7 @@ sub read_all_conf { #- $intf->{$device}{DEVICE} : DEVICE = $device #- $intf->{$device}{BOOTPROTO} : boot prototype : "bootp" or "dhcp" or "pump" or ... sub configureNetwork2 { - my ($prefix, $netc, $intf, $install) = @_; + my ($in, $prefix, $netc, $intf, $install) = @_; my $etc = "$prefix/etc"; $netc->{wireless_eth} and $install->('wireless-tools'); @@ -464,8 +464,12 @@ sub configureNetwork2 { write_interface_conf("$etc/sysconfig/network-scripts/ifcfg-$_->{DEVICE}", $_) foreach grep { $_->{DEVICE} } values %$intf; add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf); - grep { $_->{BOOTPROTO} =~ /^(dhcp)$/ } values %$intf and $install && $install->('dhcpcd'); - grep { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $install && $install->('pump'); + if (grep { $_->{BOOTPROTO} =~ /^(dhcp)$/ } values %$intf) { + $::isStandalone ? $in->standalone::pkgs_install('dhcpd') : $install->('dhcpcd'); + } + if (grep { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf) { + $::isStandalone ? $in->standalone::pkgs_install('pump') : $install->('pump'); + } #-res_init(); #- reinit the resolver so DNS changes take affect any::miscellaneousNetwork($prefix); diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet index 98a270f7a..115ada6eb 100755 --- a/perl-install/standalone/draknet +++ b/perl-install/standalone/draknet @@ -340,7 +340,7 @@ sub apply { $old_profile=$netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default"; netconnect::save_conf('', $netcnx, $netc, $intf); - network::configureNetwork2($prefix, $netc, $intf, \&standalone::pkgs_install); + network::configureNetwork2($in, $prefix, $netc, $intf, \&standalone::pkgs_install); $netcnx->{type} =~ /adsl/ or system("/sbin/chkconfig --del adsl 2> /dev/null"); system("$prefix/etc/rc.d/init.d/network $_") foreach "stop", "start"; $button_apply->set_sensitive(0); |