summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
commit8fc41a1333f01496878ca0561f3ca1ad186b6d64 (patch)
tree2dd030c580d5b8e954bce95508ac7ecacc6127b9 /perl-install/install_steps.pm
parent671adafbfbb78f044970bc4af895ed43dff99757 (diff)
downloaddrakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.gz
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.bz2
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.xz
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.zip
- merge network settings in a $net hash (it modifies $o fields too):
o $netc becomes $net->{network} and $net->{resolv} o $intf becomes $net->{ifcfg} - move zeroconf config stuff in write_zeroconf - read_tmdns_conf -> read_zeroconf - read_all_conf -> read_net_conf - configureNetwork2 -> configure_network - configure_network: write ifcfg files for ppp interfaces too - don't install wireless-tools in configure_network, this package is in basesystem - most functions don't need the file path as an argument in network::network - drop network::tools::remove_initscript - don't export too much from network::network - don't export from network::tools - remove adsl_unsupported_eci step in drakconnect - drop passwd2 field in network::adsl - drop $net->{isdn_internal} - network::netconnect : main -> safe_main - use network::netconnect::real_main during install - don't read network config in network::netconnect::real_main - install_steps::upNetwork : resolv.conf is already symlinked by network::network::configure_network when appropriate - try to fix install_any::generate_automatic_stage1_params to use a real interface configuration - put authentication stuff in $net->{auth} - drop network::ethernet::write_ether_conf - drop network::adsl::get_wizard - use 'static' instead of 'manual' as ADSL method - drop first_modem and its workarounds in network::modem - drop deprecated "multiple_internet_cnx" step in drakconnect - don't save /etc/sysconfig/drakconnect anymore - drop MDK::Common::Globals stuff - drop getIP in net_applet (Pixel) - drop $netc->{DHCP} - configure_network(): write resolv.conf even if a dhcp interface is configured
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm25
1 files changed, 10 insertions, 15 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index f4b170a93..356541707 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -404,7 +404,7 @@ sub beforeInstallPackages {
install_any::write_fstab($o);
require network::network;
- network::network::add2hosts("$o->{prefix}/etc/hosts", "localhost", "127.0.0.1");
+ network::network::add2hosts("localhost", "127.0.0.1");
log::l("setting excludedocs to $o->{excludedocs}");
substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$o->{prefix}/etc/rpm/macros";
@@ -655,10 +655,9 @@ sub selectMouse($) {
sub configureNetwork {
my ($o) = @_;
require network::network;
- network::network::configureNetwork2($o, $o->{modules_conf}, $o->{prefix}, $o->{netc}, $o->{intf});
+ network::network::configure_network($o->{net}, $o, $o->{modules_conf});
if ($o->{method} =~ /ftp|http|nfs/) {
- $o->{netcnx}{type} = 'lan';
- $o->{netcnx}{$_} = $o->{netc}{$_} foreach qw(NET_DEVICE NET_INTERFACE);
+ $o->{net}{type} = 'lan';
}
configure_firewall($o) if !$o->{isUpgrade};
@@ -965,8 +964,8 @@ risk!
#------------------------------------------------------------------------------
sub hasNetwork {
my ($o) = @_;
- $o->{netcnx}{type} && $o->{netc}{NETWORKING} ne 'no' and return 1;
- log::l("no network seems to be configured for internet ($o->{netcnx}{type},$o->{netc}{NETWORKING})");
+ $o->{net}{type} && $o->{net}{network}{NETWORKING} ne 'no' and return 1;
+ log::l("no network seems to be configured for internet ($o->{net}{type},$o->{net}{network}{NETWORKING})");
0;
}
@@ -974,27 +973,23 @@ sub hasNetwork {
sub upNetwork {
my ($o, $b_pppAvoided) = @_;
- #- do not destroy this file if prefix is '' or even '/' (could it happens ?).
- if (length($o->{prefix}) > 1) {
- -f "$o->{prefix}/etc/$_" && symlinkf("$o->{prefix}/etc/$_", "/etc/$_") foreach qw(resolv.conf protocols services);
- }
member($o->{method}, qw(ftp http nfs)) and return 1;
$o->{modules_conf}->write;
if (hasNetwork($o)) {
- if ($o->{netcnx}{type} =~ /adsl|lan|cable/) {
- log::l("starting network ($o->{netcnx}{type})");
+ if ($o->{net}{type} =~ /adsl|lan|cable/) {
+ log::l("starting network ($o->{net}{type})");
require network::netconnect;
network::netconnect::start_internet($o);
return 1;
} elsif (!$b_pppAvoided) {
- log::l("starting network (ppp: $o->{netcnx}{type})");
+ log::l("starting network (ppp: $o->{net}{type})");
eval { modules::load(qw(serial ppp bsd_comp ppp_deflate)) };
run_program::rooted($o->{prefix}, "/etc/rc.d/init.d/syslog", "start");
require network::netconnect;
network::netconnect::start_internet($o);
return 1;
} else {
- log::l(qq(not starting network (b/c ppp avoided and type is "$o->{netcnx}{type})"));
+ log::l(qq(not starting network (b/c ppp avoided and type is "$o->{net}{type})"));
}
}
$::testing;
@@ -1011,7 +1006,7 @@ sub downNetwork {
require network::netconnect;
network::netconnect::stop_internet($o);
return 1;
- } elsif ($o->{netc}{type} !~ /adsl|lan|cable/) {
+ } elsif (member($o->{net}{type}, qw(adsl lan cable))) {
require network::netconnect;
network::netconnect::stop_internet($o);
run_program::rooted($o->{prefix}, "/etc/rc.d/init.d/syslog", "stop");