summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm10
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/install_steps_interactive.pm15
3 files changed, 20 insertions, 7 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index b692650f0..17e20c5fc 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -224,6 +224,8 @@ $o = $::o = {
};
+$::oo = {};
+
#-######################################################################################
#- Steps Functions
#- each step function are called with two arguments : clicked(because if you are a
@@ -232,7 +234,7 @@ $o = $::o = {
#------------------------------------------------------------------------------
sub selectLanguage {
- $o->selectLanguage($_[1] == 1);
+ $o->selectLanguage;
addToBeDone {
lang::write($o->{prefix});
@@ -299,7 +301,7 @@ sub partitionDisks {
return install_any::searchAndMount4Upgrade($o) if $o->{isUpgrade};
my $stage1_hd;
- if (cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/hdimage\s+(\S+)|) {
+ if (cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage\s+(\S+)|) {
$stage1_hd = { dev => $1, fs => $2 };
install_any::getFile("XXX"); #- close still opened filehandle
fs::umount("/tmp/hdimage");
@@ -557,6 +559,9 @@ sub main {
map_each {
my ($n, $v) = @_;
my $f = ${{
+ oem => sub { $::oo->{oem} = $v },
+ lang => sub { $o->{lang} = $v },
+ flang => sub { $o->{lang} = $::oo->{lang} = $v },
method => sub { $o->{method} = $v },
pcmcia => sub { $o->{pcmcia} = $v },
vga16 => sub { $o->{vga16} = $v },
@@ -564,6 +569,7 @@ sub main {
expert => sub { $::expert = 1; $::beginner = 0 },
beginner => sub { $::beginner = $v },
class => sub { $o->{installClass} = $v },
+ fclass => sub { $o->{installClass} = $::oo->{installClass} = $v },
lnx4win => sub { $o->{lnx4win} = 1 },
readonly => sub { $o->{partitioning}{readonly} = $v ne "0" },
display => sub { $o->{display} = $v },
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 1ec391071..5909636f7 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -504,7 +504,7 @@ sub killCardServices {
}
sub hdInstallPath() {
- cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/hdimage| or return;
+ cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage| or return;
my ($part) = grep { $_->{device} eq $1 } @{$::o->{fstab}};
$part->{mntpoint} or grep { $_->{mntpoint} eq "/mnt/hd" } @{$::o->{fstab}} and return;
$part->{mntpoint} ||= "/mnt/hd";
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 924f1a6ea..4e288b1ba 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -57,7 +57,7 @@ sub selectLanguage($) {
_("Please, choose a language to use."),
# the translation may be used for the help
[ lang::list() ],
- lang::lang2text($o->{lang})));
+ lang::lang2text($o->{lang}))) unless $::oo->{lang};
install_steps::selectLanguage($o);
#- $o->{useless_thing_accepted} = $o->ask_from_list_('',
@@ -105,6 +105,12 @@ sub selectInstallClass1 {
#------------------------------------------------------------------------------
sub selectInstallClass($@) {
my ($o, @classes) = @_;
+
+ if ($::oo->{installClass}) {
+ delete $::o->{mouse}{unsafe} if $::oo->{oem};
+ return install_steps::selectInstallClass($o);
+ }
+
my %c = my @c = (
$::corporate ? () : (
_("Automated") => "beginner",
@@ -483,7 +489,7 @@ notation (for example, 1.2.3.4)."),
}
},
focus_out => sub {
- $intf->{NETMASK} = network::netmask($intf->{IPADDR}) unless $_[0]
+ $intf->{NETMASK} ||= network::netmask($intf->{IPADDR}) unless $_[0]
}
);
}
@@ -608,7 +614,7 @@ sub timeConfig {
my ($o, $f, $clicked) = @_;
require timezone;
- $o->{timezone}{timezone} = $o->ask_from_treelist('', _("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone});
+ $o->{timezone}{timezone} = $o->ask_from_treelist('', _("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone}) if !$::oo->{oem} || $clicked;
$o->{timezone}{UTC} = $o->ask_yesorno('', _("Is your hardware clock set to GMT?"), $o->{timezone}{UTC}) if $::expert || $clicked;
install_steps::timeConfig($o, $f);
}
@@ -1052,6 +1058,7 @@ Do you want to try XFree 4.0?")) if $::expert && arch() != /sparc/;
{ local $::testing = 0; #- unset testing
local $::auto = $::beginner;
local $::noauto = $::expert && !$o->ask_yesorno('', _("Try to find PCI devices?"), 1);
+ local $::skiptest = $::oo->{oem}; #- if lang is forced, assume no test (HACK)
$::noauto = $::noauto; #- no warning
Xconfigurator::main($o->{prefix}, $o->{X}, $o, $o->{allowFB}, bool($o->{pcmcia}), sub {
@@ -1154,7 +1161,7 @@ For information on fixes which are available for this release of Linux-Mandrake,
consult the Errata available from http://www.linux-mandrake.com/.
Information on configuring your system is available in the post
-install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install;
+install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install && !$::oo->{oem};
$::global_wait = $o->wait_message('', _("Shutting down"));
}