summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-11-06 12:28:49 +0000
committerFrancois Pons <fpons@mandriva.com>1999-11-06 12:28:49 +0000
commitd4c48e8a8f0c4213dc6fb0fdaa606c1f50417430 (patch)
treeff97685f66e4cb25e4759dd897c9e1ac65ca4994
parente9c6665ac3bd856e38bca0685bf5b8ee34997977 (diff)
downloaddrakx-backup-do-not-use-d4c48e8a8f0c4213dc6fb0fdaa606c1f50417430.tar
drakx-backup-do-not-use-d4c48e8a8f0c4213dc6fb0fdaa606c1f50417430.tar.gz
drakx-backup-do-not-use-d4c48e8a8f0c4213dc6fb0fdaa606c1f50417430.tar.bz2
drakx-backup-do-not-use-d4c48e8a8f0c4213dc6fb0fdaa606c1f50417430.tar.xz
drakx-backup-do-not-use-d4c48e8a8f0c4213dc6fb0fdaa606c1f50417430.zip
*** empty log message ***
-rw-r--r--perl-install/Xconfigurator.pm14
-rw-r--r--perl-install/install2.pm6
-rw-r--r--perl-install/install_steps.pm6
-rw-r--r--perl-install/install_steps_interactive.pm112
-rw-r--r--perl-install/mouse.pm1
5 files changed, 63 insertions, 76 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index d4cdc55ad..176d0a430 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -188,7 +188,7 @@ sub monitorConfiguration(;$$) {
if ($useFB) {
#- use smallest values for monitor configuration since FB is used,
- #- BIOS initialize graphics, hopes X server will not refuses that.
+ #- BIOS initialize graphics, current X server will not refuse that.
$monitor->{hsyncrange} ||= $hsyncranges[0];
$monitor->{vsyncrange} ||= $vsyncranges[0];
add2hash($monitor, { type => "Unknown", vendor => "Unknown", model => "Unknown" });
@@ -379,12 +379,10 @@ sub autoDefaultDepth($$) {
}
}
-sub autoDefaultResolution(;$$) {
+sub autoDefaultResolution(;$) {
my $size = round(shift || 14); #- assume a small monitor (size is in inch)
- my $useFB = shift || 0;
- $useFB ? "800x600" : #- always take this one since 640x480x16 should allow 800x600x16 in all case (?).
- $monitorSize2resolution[$size] ||
- $monitorSize2resolution[$#monitorSize2resolution]; #- no corresponding resolution for this size. It means a big monitor, take biggest we have
+ $monitorSize2resolution[$size] ||
+ $monitorSize2resolution[$#monitorSize2resolution]; #- no corresponding resolution for this size. It means a big monitor, take biggest we have
}
sub chooseResolutionsGtk($$;$) {
@@ -524,7 +522,7 @@ Try with another video card or monitor")), return;
#- remove unusable resolutions (based on the video memory size and the monitor hsync rate)
keepOnlyLegalModes($card, $o->{monitor});
- my $res = $o->{resolution_wanted} || autoDefaultResolution($o->{monitor}{size}, $o->{card}{server} eq 'FBdev');
+ my $res = $o->{resolution_wanted} || autoDefaultResolution($o->{monitor}{size});
my $wres = first(split 'x', $res);
my $depth = eval { $card->{default_depth} || autoDefaultDepth($card, $wres) };
@@ -721,7 +719,7 @@ sub main {
$o->{monitor} = monitorConfiguration($o->{monitor}, $o->{card}{server} eq 'FBDev');
- my $ok = resolutionsConfiguration($o, auto => ($::auto && $o->{card}{server} ne 'FBDev'), noauto => $::noauto);
+ my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto);
$ok &&= testFinalConfig($o, $::auto);
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index be8c56704..3765fb147 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -48,7 +48,6 @@ my @installSteps = (
doInstallStep => [ __("Install system"), 1, -1 ],
miscellaneous => [ __("Miscellaneous"), 1, 1 ],
configureNetwork => [ __("Configure networking"), 1, 1, "formatPartitions" ],
-#- configureModem => [ __("Configure modem"), 1, 1, "doInstallStep" ],
configureTimezone => [ __("Configure timezone"), 1, 1, "doInstallStep" ],
#- configureServices => [ __("Configure services"), 0, 0 ],
configurePrinter => [ __("Configure printer"), 1, 0, "doInstallStep" ],
@@ -365,11 +364,6 @@ sub configureNetwork {
$o->configureNetwork($entered == 1 && !$clicked)
}
#------------------------------------------------------------------------------
-sub configureModem {
- my ($clicked, $entered) = @_;
- $o->modemConfig($clicked || $entered == 1);
-}
-#------------------------------------------------------------------------------
sub configureTimezone {
my ($clicked) = $_[0];
my $f = "$o->{prefix}/etc/sysconfig/clock";
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 6bcdf4d69..4ae18d73d 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -258,9 +258,9 @@ sub pppConfig {
$toreplace{$_} = $o->{modem}{$_} foreach qw(connection phone login passwd auth domain);
$toreplace{phone} =~ s/[^\d]//g;
$toreplace{dnsserver} = ($o->{modem}{dns1} && "$o->{modem}{dns1},") . ($o->{modem}{dns2} && "$o->{modem}{dns2},");
- $toreplace{exdnsdisabled} = $o->{modem}{exdnsdisabled} ? 1 : 0;
- template2file("/usr/share/kppprc.in" ,"$o->{prefix}/root/.kde/share/config/kppprc", %toreplace);
- template2file("/usr/share/kppprc.in" ,"$o->{prefix}/etc/skel/.kde/share/config/kppprc", %toreplace);
+ foreach ("$o->{prefix}/root", "$o->{prefix}/etc/skel") {
+ template2file("/usr/share/kppprc.in", "$_/.kde/share/config/kppprc", %toreplace) if -d "$_/.kde/share/config";
+ }
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 75bf2a715..09a17c9e5 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -241,48 +241,70 @@ sub configureNetwork($) {
my ($o, $first_time) = @_;
my $r = '';
if ($o->{intf}) {
- if ($first_time) {
+ if (!$::beginner && $first_time) {
my @l = (
__("Keep the current IP configuration"),
__("Reconfigure network now"),
__("Do not set up networking"),
);
- $r = $o->ask_from_list_(_("Network Configuration"),
+ $r = $o->ask_from_list_([ _("Network Configuration") ],
_("Local networking has already been configured. Do you want to:"),
- [ @l ]);
- $r ||= "Don't";
+ [ @l ]) || "Do not";
}
+ $r = "Keep" if $::beginner;
+ } elsif ($o->{modem}) {
+ $r = "Dialup";
} 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";
+ $r = !$::beginner &&
+ $o->ask_from_list_([ _("Network Configuration") ],
+ _("Do you want to configure networking for yout system?"),
+ [ __("Local LAN"), __("Dialup with modem"), __("Do not set up networking") ]) || "Do not";
}
- if ($r =~ /^Don't/) { #-' for xgettext
- $o->{netc}{NETWORKING} = "false";
- } elsif ($r !~ /^Keep/) {
- $o->setup_thiskind('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 return;
-
- $o->{netc} ||= {};
- delete $o->{netc}{dnsServer};
- delete $o->{netc}{GATEWAY};
- $last = $intf;
+ if ($r =~ /^Dialup/) {
+ my ($device, $desc) = $o->{modem}{device};
+ unless ($device || $::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;
+ }
}
- #- {
- #- my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain..."));
- #- network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf});
- #- }
- $last->{BOOTPROTO} =~ /^(dhcp|bootp)$/ ||
- $o->configureNetworkNet($o->{netc}, $last ||= {}, @l) or return;
+ $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;
+ install_steps::modemConfig($o);
+
+ $o->pppConfig();
+ } else {
+ if ($r =~ /^Do not/) {
+ $o->{netc}{NETWORKING} = "false";
+ } elsif ($r !~ /^Keep/) {
+ $o->setup_thiskind('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 return;
+
+ $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});
+ #- }
+ $last->{BOOTPROTO} =~ /^(dhcp|bootp)$/ ||
+ $o->configureNetworkNet($o->{netc}, $last ||= {}, @l) or return;
+ }
+ install_steps::configureNetwork($o);
}
- install_steps::configureNetwork($o);
}
sub configureNetworkIntf {
@@ -333,33 +355,6 @@ 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) = @_;
@@ -372,11 +367,10 @@ _("Authentication") => { val => \$o->{modem}{auth}, list => [ __("PAP"), __("CHA
_("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"),
+ _("Dialup options"),
[ grep_index { even($::i) } @l ],
[ grep_index { odd($::i) } @l ]);
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 406ecbbdf..795d859b1 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -81,6 +81,7 @@ sub write($;$) {
sub detect() {
my %l;
+ eval { modules::load("serial") };
@l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) or die "mouseconfig failed";
\%l;
}