From 152b0b998e117a4a79dd77d401df8cfc234574a5 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Sat, 6 Nov 1999 09:10:11 +0000 Subject: *** empty log message *** --- perl-install/install_steps_interactive.pm | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'perl-install/install_steps_interactive.pm') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index e74c78b3c..75bf2a715 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -253,6 +253,7 @@ sub configureNetwork($) { $r ||= "Don't"; } } else { +# $r = $o->ask_from_list(_("Network Configuration"),) $o->ask_yesorno(_("Network Configuration"), _("Do you want to configure LAN (not dialup) networking for your system?")) or $r = "Don't"; } @@ -331,6 +332,55 @@ You may also enter the IP address of the gateway if you have one"), ); } +#------------------------------------------------------------------------------ +sub modemConfig { + my ($o, $clicked) = @_; + return unless $clicked; + + if ($o->ask_yesorno('', _("Do you have a modem?"), 0)) { + my ($device, $desc) = ''; + unless ($::expert && $o->ask_yesorno('', _("Skip modem autodetection?"), 1)) { + foreach (0..3) { + next if readlink("$o->{prefix}/dev/mouse") =~ /ttyS$_/; + $desc = detect_devices::hasModem("$o->{prefix}/dev/ttyS$_"); + $device = "ttyS$_" if $desc; + last if $device; + } + } + $device = mouse::serial_ports_names2dev($o->ask_from_list('', _("Which serial port is your modem connected to?"), + [ mouse::serial_ports_names() ])) unless $device; + log::l("using modem at /dev/$device"); + $o->{modem}{device} = $device; + } else { + $o->{modem} = undef; + } + + install_steps::modemConfig($o); + + $o->pppConfig() if $o->{modem}; +} + +sub pppConfig { + my ($o) = @_; + + my @l = ( +_("Connection name") => \$o->{modem}{connection}, +_("Phone number") => \$o->{modem}{phone}, +_("Login ID") => \$o->{modem}{login}, +_("Password") => { val => \$o->{modem}{passwd}, hidden => 1 }, +_("Authentication") => { val => \$o->{modem}{auth}, list => [ __("PAP"), __("CHAP"), __("Terminal-based"), __("Script-based") ] }, +_("Domain name") => \$o->{modem}{domain}, +_("First DNS Server") => \$o->{modem}{dns1}, +_("Second DNS Server") => \$o->{modem}{dns2}, +_("Disable existing DNS servers during connection") => { val => \$o->{modem}{exdnsdisabled}, type => 'bool', }, + ); + + install_steps::pppConfig($o) if $o->ask_from_entries_ref('', + _("Dial-in options"), + [ grep_index { even($::i) } @l ], + [ grep_index { odd($::i) } @l ]); +} + #------------------------------------------------------------------------------ sub timeConfig { my ($o, $f, $clicked) = @_; -- cgit v1.2.1