diff options
author | damien <damien@mandriva.com> | 2000-09-01 04:29:05 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-09-01 04:29:05 +0000 |
commit | 9e6f0a8dc550dcbb0025b6c78e9938dade9831af (patch) | |
tree | 2c493e8cafe1ec92892e819e0d6134fc0a272b15 /perl-install/install_steps_interactive.pm | |
parent | e02218b14f952753aa6ddc3b6cfb9a067732919e (diff) | |
download | drakx-backup-do-not-use-9e6f0a8dc550dcbb0025b6c78e9938dade9831af.tar drakx-backup-do-not-use-9e6f0a8dc550dcbb0025b6c78e9938dade9831af.tar.gz drakx-backup-do-not-use-9e6f0a8dc550dcbb0025b6c78e9938dade9831af.tar.bz2 drakx-backup-do-not-use-9e6f0a8dc550dcbb0025b6c78e9938dade9831af.tar.xz drakx-backup-do-not-use-9e6f0a8dc550dcbb0025b6c78e9938dade9831af.zip |
see changelog. Big changes.
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 132 |
1 files changed, 8 insertions, 124 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 712fc5584..09ed55085 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -168,7 +168,7 @@ sub selectMouse { [ mouse::serial_ports ]); } - install_interactive::setup_thiskind($o, 'usb', !$::expert, 0) if $o->{mouse}{device} eq "usbmouse"; + any::setup_thiskind($o, 'usb', !$::expert, 0, $o->{pcmcia}) if $o->{mouse}{device} eq "usbmouse"; eval { devices::make("usbmouse"); modules::load("usbmouse"); @@ -184,7 +184,7 @@ sub setupSCSI { my $w = $o->wait_message(_("IDE"), _("Configuring IDE")); modules::load_ide(); } - install_interactive::setup_thiskind($o, 'scsi|disk', $_[1], $_[2]); + any::setup_thiskind($o, 'scsi|disk', $_[1], $_[2], $o->{pcmcia}); } sub ask_mntpoint_s { @@ -458,111 +458,15 @@ sub afterInstallPackages($) { } #------------------------------------------------------------------------------ -sub configureNetwork($) { +sub configureNetwork { my ($o, $first_time) = @_; - local $_; - if (@{$o->{intf}} > 0 && $first_time) { - my @l = ( - __("Keep the current IP configuration"), - __("Reconfigure network now"), - __("Do not set up networking"), - ); - $_ = $::beginner ? "Keep" : - $o->ask_from_list_([ _("Network Configuration") ], - _("Local networking has already been configured. Do you want to:"), - [ @l ]) || "Do not"; - } else { - $_ = (!$::beginner || install_interactive::setup_thiskind($o, 'net', 1, 0)) && - $o->ask_yesorno([ _("Network Configuration") ], - _("Do you want to configure a local network for your system?"), 0) ? "Local LAN" : "Do not"; - } - if (/^Do not/) { - $o->{netc}{NETWORKING} = "false"; - } elsif (!/^Keep/) { - install_interactive::setup_thiskind($o, 'net', !$::expert, 1); - my @l = detect_devices::getNet() or die _("no network card found"); - - my $last; foreach ($::beginner ? $l[0] : @l) { - my $intf = network::findIntf($o->{intf} ||= [], $_); - add2hash($intf, $last); - add2hash($intf, { NETMASK => '255.255.255.0' }); - $o->configureNetworkIntf($intf) or last; - - $o->{netc} ||= {}; - delete $o->{netc}{dnsServer}; - delete $o->{netc}{GATEWAY}; - $last = $intf; - } - #- { - #- my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain...")); - #- network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf}); - #- } - if ($last->{BOOTPROTO} =~ /^(dhcp|bootp)$/) { - $o->ask_from_entries_ref(_("Configuring network"), -_("Please enter your host name if you know it. -Some DHCP servers require the hostname to work. -Your host name should be a fully-qualified host name, -such as ``mybox.mylab.myco.com''."), - [_("Host name:")], [ \$o->{netc}{HOSTNAME} ]); - } else { - $o->configureNetworkNet($o->{netc}, $last ||= {}, @l); - } - $o->miscellaneousNetwork(); - } - install_steps::configureNetwork($o); - - #- added internet configuration after ethernet one. - netconnect::net_connect($o->{prefix}, $o->{netcnx}, $o, bool($o->{pcmcia})); #-dam's + $o->{netcnx}||={}; + netconnect::net_connect($o->{prefix}, $o->{netcnx}, $o->{netc}, $o->{modem}, $o->{mouse}, $o, $o->{pcmcia}, $o->{intf}, $first_time); } -sub configureNetworkIntf { - my ($o, $intf) = @_; - my $pump = $intf->{BOOTPROTO} =~ /^(dhcp|bootp)$/; - delete $intf->{NETWORK}; - delete $intf->{BROADCAST}; - my @fields = qw(IPADDR NETMASK); - $o->set_help('configureNetworkIP'); - $o->ask_from_entries_ref(_("Configuring network device %s", $intf->{DEVICE}), -($::isStandalone ? '' : _("Configuring network device %s", $intf->{DEVICE}) . "\n\n") . -_("Please enter the IP configuration for this machine. -Each item should be entered as an IP address in dotted-decimal -notation (for example, 1.2.3.4)."), - [ _("IP address:"), _("Netmask:"), _("Automatic IP") ], - [ \$intf->{IPADDR}, \$intf->{NETMASK}, { val => \$pump, type => "bool", text => _("(bootp/dhcp)") } ], - complete => sub { - $intf->{BOOTPROTO} = $pump ? "dhcp" : "static"; - return 0 if $pump; - for (my $i = 0; $i < @fields; $i++) { - unless (network::is_ip($intf->{$fields[$i]})) { - $o->ask_warn('', _("IP address should be in format 1.2.3.4")); - return (1,$i); - } - return 0; - } - }, - focus_out => sub { - $intf->{NETMASK} ||= network::netmask($intf->{IPADDR}) unless $_[0] - } - ); -} - -sub configureNetworkNet { - my ($o, $netc, $intf, @devices) = @_; - - $netc->{dnsServer} ||= network::dns($intf->{IPADDR}); - $netc->{GATEWAY} ||= network::gateway($intf->{IPADDR}); - - $o->ask_from_entries_ref(_("Configuring network"), -_("Please enter your host name. -Your host name should be a fully-qualified host name, -such as ``mybox.mylab.myco.com''. -You may also enter the IP address of the gateway if you have one"), - [_("Host name:"), _("DNS server:"), _("Gateway:"), $::expert ? _("Gateway device:") : ()], - [(map { \$netc->{$_} } qw(HOSTNAME dnsServer GATEWAY)), - {val => \$netc->{GATEWAYDEV}, list => \@devices}] - ); -} +#-configureNetworkIntf moved to network +#-configureNetworkNet moved to network #------------------------------------------------------------------------------ #-pppConfig moved to any.pm #------------------------------------------------------------------------------ @@ -865,27 +769,7 @@ try to force installation even if that destroys the first partition?")); } #------------------------------------------------------------------------------ -sub miscellaneousNetwork { - my ($o, $clicked) = @_; - my $u = $o->{miscellaneous} ||= {}; - - $o->set_help('configureNetworkProxy'); - !$::beginner || $clicked and $o->ask_from_entries_ref('', - _("Proxies configuration"), - [ _("HTTP proxy"), - _("FTP proxy"), - ], - [ \$u->{http_proxy}, - \$u->{ftp_proxy}, - ], - complete => sub { - $u->{http_proxy} =~ m,^($|http://), or $o->ask_warn('', _("Proxy should be http://...")), return 1,3; - $u->{ftp_proxy} =~ m,^($|ftp://), or $o->ask_warn('', _("Proxy should be ftp://...")), return 1,4; - 0; - } - ) || return; -} - +#- miscellaneousNetwork moved to network.pm #------------------------------------------------------------------------------ sub miscellaneous { my ($o, $clicked) = @_; |