summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-04 20:29:24 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-04 20:29:24 +0000
commit9f4d9db50a2434acb6fde63ead071d9754e80f38 (patch)
tree515987dc42e58957190bbfd8b4c4b583997cf51b /perl-install
parent8d5fe6fe6ab47eb0b460fd954b047313a7e431bc (diff)
downloaddrakx-backup-do-not-use-9f4d9db50a2434acb6fde63ead071d9754e80f38.tar
drakx-backup-do-not-use-9f4d9db50a2434acb6fde63ead071d9754e80f38.tar.gz
drakx-backup-do-not-use-9f4d9db50a2434acb6fde63ead071d9754e80f38.tar.bz2
drakx-backup-do-not-use-9f4d9db50a2434acb6fde63ead071d9754e80f38.tar.xz
drakx-backup-do-not-use-9f4d9db50a2434acb6fde63ead071d9754e80f38.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm39
-rw-r--r--perl-install/install_steps_interactive.pm2
-rw-r--r--perl-install/modules.pm20
3 files changed, 39 insertions, 22 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 25333ee9e..4b1c2bdad 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -226,15 +226,30 @@ my @install_classes = (__("beginner"), __("developer"), __("server"), __("expert
#-#####################################################################################
#-Default value
#-#####################################################################################
-# partition layout for a server
-# NOT YET USED
-my @serverPartitioning = (
- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
- { mntpoint => "/", size => 256 << 11, type => 0x83 },
- { mntpoint => "/usr", size => 512 << 11, type => 0x83, growable => 1 },
- { mntpoint => "/var", size => 256 << 11, type => 0x83 },
- { mntpoint => "/home", size => 512 << 11, type => 0x83, growable => 1 },
- { mntpoint => "swap", size => 64 << 11, type => 0x82 }
+# partition layout
+my %suggestedPartitions = (
+ beginner => [
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+ { mntpoint => "swap", size => 128 << 11, type => 0x82 },
+ { mntpoint => "/", size => 700 << 11, type => 0x83 },
+ { mntpoint => "/home", size => 300 << 11, type => 0x83 },
+ ],
+ developer => [
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+ { mntpoint => "swap", size => 128 << 11, type => 0x82 },
+ { mntpoint => "/", size => 200 << 11, type => 0x83 },
+ { mntpoint => "/usr", size => 600 << 11, type => 0x83 },
+ { mntpoint => "/home", size => 500 << 11, type => 0x83 },
+ ],
+ server => [
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+ { mntpoint => "swap", size => 512 << 11, type => 0x82 },
+ { mntpoint => "/", size => 200 << 11, type => 0x83 },
+ { mntpoint => "/usr", size => 600 << 11, type => 0x83 },
+ { mntpoint => "/var", size => 600 << 11, type => 0x83 },
+ { mntpoint => "/home", size => 500 << 11, type => 0x83 },
+ ],
+ expert => [],
);
#-#######################################################################################
@@ -246,7 +261,7 @@ my @serverPartitioning = (
$o = $::o = {
bootloader => { onmbr => 1, linear => 0 },
autoSCSI => 0,
- mkbootdisk => "fd0", # no mkbootdisk if 0 or undef, find a floppy with 1
+ mkbootdisk => 1, # no mkbootdisk if 0 or undef, find a floppy with 1
# packages => [ qw() ],
partitioning => { clearall => $::testing, eraseBadPartitions => 0, auto_allocate => 0, autoformat => 0 },
# partitions => [
@@ -364,8 +379,10 @@ sub selectInstallClass {
$o->selectInstallClass(@install_classes);
$::expert = $o->{installClass} eq "expert";
+ $o->{partitions} = $suggestedPartitions{$o->{installClass}};
+
addToBeDone {
- install_any::setPackages($o); #update package list
+ install_any::setPackages($o); #update package list
} 'formatPartitions';
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index cd9736d5e..e778c6fa3 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -427,7 +427,7 @@ sub load_thiskind {
modules::load_thiskind($type, sub {
$w = $o->wait_message('',
[ _("Installing driver for %s card %s", $type, $_->[0]),
- $o->{installClass} ne "beginner" ? _("(module %s)", $_->[1]) : ()
+ $::beginner ? _("(module %s)", $_->[1]) : ()
]);
});
}
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index f24a844bf..5ca395645 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -241,10 +241,13 @@ sub text2driver($) {
sub load($;$@) {
my ($name, $type, @options) = @_;
+
+ $conf{'scsi_hostadapter' . ($conf{scsi}++ || '')}{alias} = $name
+ if $type eq 'scsi';
+
if ($::testing) {
log::l("i try to install $name module");
} else {
-
$conf{$name}{loaded} and return;
$type ||= $drivers{$name}{type};
@@ -301,9 +304,13 @@ sub load_deps($) {
sub read_conf {
my ($file) = @_;
my %c;
+ $c{scsi} = 0;
foreach (cat_($file)) {
- $c{$2}{$1} = $3 if /^\s*(\S+)\s+(\S+)\s+(.*?)\s*$/;
+ do {
+ $c{$2}{$1} = $3;
+ $c{scsi} = max($c{scsi}, $1 || 0) if /^\s*alias\s+scsi_hostadapter (\d*)/x;
+ } if /^\s*(\S+)\s+(\S+)\s+(.*?)\s*$/;
}
# cheating here: not handling aliases of aliases
while (my ($k, $v) = each %c) {
@@ -319,20 +326,13 @@ sub read_conf {
sub write_conf {
my ($file) = @_;
my %written = read_conf($file);
- my $scsi = $written{scsi};
local *F;
open F, ">> $file" or die("cannot write module config file $file: $!\n");
while (my ($mod, $h) = each %conf) {
while (my ($type, $v2) = each %$h) {
- unless ($written{$mod}{$type}) {
- if ($mod eq 'scsi_hostadapter') {
- print "#" if $scsi;
- $scsi ||= 1;
- }
- print F "$type $mod $v2\n" unless $type eq "loaded";
- }
+ print F "$type $mod $v2\n" if $v2 && $type ne "loaded" && !$written{$mod}{$type};
}
}
}