summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/install_interactive.pm65
-rw-r--r--perl-install/install_steps_auto_install.pm2
-rw-r--r--perl-install/install_steps_interactive.pm18
-rw-r--r--perl-install/modules.pm5
-rwxr-xr-xrescue/tree/sbin/modprobe2
6 files changed, 54 insertions, 40 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 45864b015..12a23ee08 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -623,7 +623,7 @@ sub suggest_mount_points {
my $d = $handle->{dir};
my ($mnt) = grep { -e "$d/$l{$_}" } keys %l;
$mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$user if -e "$d/.bashrc";
- $mnt ||= (grep { -d $_ && (stat($_))[4] >= 500 } glob_("$d")) && '/home';
+ $mnt ||= (grep { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_("$d")) && '/home';
next if $uniq && fsedit::mntpoint2part($mnt, \@parts);
$part->{mntpoint} = $mnt;
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index fa02fe13c..fd7e85024 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -17,7 +17,29 @@ use devices;
use modules;
-sub partitionWizard {
+sub partition_with_diskdrake {
+ my ($o, $hds) = @_;
+ my $ok = 1;
+ do {
+ diskdrake::main($hds, $o->{raid}, interactive_gtk->new, $o->{partitions});
+ delete $o->{wizard} and return partitionWizard($o);
+ my @fstab = fsedit::get_fstab(@$hds);
+
+ unless (fsedit::get_root(\@fstab)) {
+ $ok = 0;
+ $o->ask_okcancel('', _("You must have a root partition.
+For this, create a partition (or click on an existing one).
+Then choose action ``Mount point'' and set it to `/'"), 1) or return;
+ }
+ if (!grep { isSwap($_) } @fstab) {
+ $o->ask_warn('', _("You must have a swap partition")), $ok=0 if $::beginner;
+ $ok &&= $::expert || $o->ask_okcancel('', _("You don't have a swap partition\n\nContinue anyway?"));
+ }
+ } until $ok;
+ 1;
+}
+
+sub partitionWizardSolutions {
my ($o, $hds, $fstab, $readonly) = @_;
my @wizlog;
my (@solutions, %solutions);
@@ -120,26 +142,7 @@ When sure, press Ok.")) or return;
}
if (!$readonly && ref($o) =~ /gtk/) { #- diskdrake only available in gtk for now
- $solutions{diskdrake} =
- [ 0, _("Use diskdrake"), sub {
- my $ok = 1;
- do {
- diskdrake::main($hds, $o->{raid}, interactive_gtk->new, $o->{partitions});
- my @fstab = fsedit::get_fstab(@$hds);
-
- unless (fsedit::get_root(\@fstab)) {
- $ok = 0;
- $o->ask_okcancel('', _("You must have a root partition.
-For this, create a partition (or click on an existing one).
-Then choose action ``Mount point'' and set it to `/'"), 1) or return;
- }
- if (!grep { isSwap($_) } @fstab) {
- $o->ask_warn('', _("You must have a swap partition")), $ok=0 if $::beginner;
- $ok &&= $::expert || $o->ask_okcancel('', _("You don't have a swap partition\n\nContinue anyway?"));
- }
- } until $ok;
- 1;
- } ];
+ $solutions{diskdrake} = [ 0, _("Use diskdrake"), sub { partition_with_diskdrake($o, $hds) } ];
}
$solutions{fdisk} =
@@ -160,6 +163,26 @@ When you are done, don't forget to save using `w'", partition_table_raw::descrip
%solutions;
}
+sub partitionWizard {
+ my ($o) = @_;
+
+ my %solutions = partitionWizardSolutions($o, $o->{hds}, $o->{fstab}, $o->{partitioning}{readonly});
+
+ my @solutions = sort { $b->[0] <=> $a->[0] } values %solutions;
+
+ my $level = $::beginner ? 2 : -9999;
+ my @sol = grep { $_->[0] >= $level } @solutions;
+ @solutions = @sol if @sol > 1;
+
+ my $ok; while (!$ok) {
+ my $sol = $o->ask_from_listf('', _("The DrakX Partitioning wizard found the following solutions:"), sub { $_->[1] }, \@solutions) or redo;
+ eval { $ok = $sol->[2]->() };
+ die if $@ =~ /setstep/;
+ $ok &&= !$@;
+ $@ and $o->ask_warn('', _("Partitioning failed: %s", $@));
+ }
+}
+
#--------------------------------------------------------------------------------
sub wait_load_module {
my ($o, $type, $text, $module) = @_;
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm
index 400e2f776..e7025e64f 100644
--- a/perl-install/install_steps_auto_install.pm
+++ b/perl-install/install_steps_auto_install.pm
@@ -16,7 +16,7 @@ use common qw(:common);
use install_steps;
use log;
-my $graphical = 1;
+my $graphical = 0;
sub new {
my ($type, $o) = @_;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 0285fb95e..1d4eab9e3 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -135,7 +135,7 @@ are you ready to answer that kind of questions?"),
delete $o->{installClass};
} else {
my %c = (
- normal => _("Normal"),
+ normal => _("Workstation"),
developer => _("Development"),
server => _("Server"),
);
@@ -238,20 +238,10 @@ Continue at your own risk!"));
\&partition_table_raw::description,
[ install_any::find_root_parts($o->{hds}, $o->{prefix}) ]) or die "setstep exitInstall\n";
install_any::use_root_part($o->{fstab}, $p, $o->{prefix});
+ } elsif ($::expert) {
+ install_interactive::partition_with_diskdrake($o, $o->{hds});
} else {
- my %solutions = install_interactive::partitionWizard($o, $o->{hds}, $o->{fstab}, $o->{partitioning}{readonly});
- my @solutions = sort { $b->[0] <=> $a->[0] } values %solutions;
-
- my $level = $::beginner ? 2 : -9999;
- my @sol = grep { $_->[0] >= $level } @solutions;
- @solutions = @sol if @sol > 1;
-
- my $ok; while (!$ok) {
- my $sol = $o->ask_from_listf('', _("The DrakX Partitioning wizard found the following solutions:"), sub { $_->[1] }, \@solutions) or redo;
- eval { $ok = $sol->[2]->() };
- $ok &&= !$@;
- $@ and $o->ask_warn('', _("Partitioning failed: %s", $@));
- }
+ install_interactive::partitionWizard($o);
}
}
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 1b14a02fb..947108057 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -510,6 +510,7 @@ sub write_conf {
}
my @l = map { "scsi_hostadapter$_\n" } '', 1..$scsi-1 if $scsi;
push @l, "ide-floppy" if detect_devices::ide_zips();
+ log::l("to put in modules @l");
substInFile {
$_ = '' if /^scsi_hostadapter/;
@@ -534,7 +535,7 @@ sub load_thiskind {
grep {
$f->($_->{description}, $_->{driver}) if $f;
- eval { load($_->{driver}) };
+ eval { load($_->{driver}, $type) };
$_->{error} = $@;
!($@ && $_->{try});
@@ -549,7 +550,7 @@ sub get_that_type {
grep {
my $l = $drivers{$_->{driver}};
- $l && $l->{type} eq $type && detect_devices::check($_);
+ $l && $l->{type} =~ /$type/ && detect_devices::check($_);
} detect_devices::probeall('', $pcic);
}
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe
index f007d949c..574f8ff56 100755
--- a/rescue/tree/sbin/modprobe
+++ b/rescue/tree/sbin/modprobe
@@ -27,7 +27,7 @@ sub load {
$conf{$name}{loaded} and return;
eval { load($_, 'prereq') } foreach @{$deps{$name}};
- system("extract_archive /modules/modules.cz* /tmp $name.o >/dev/null");
+ system("packdrake -x /modules/modules.cz* /tmp $name.o");
-r "/tmp/$name.o" or die "can't find module $name\n";
system("/sbin/insmod -f /tmp/$name.o"); $? and die("insmod $name failed");
system("rm /tmp/$name.o");