summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-10 12:35:02 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-10 12:35:02 +0000
commitda94715e3d4e07486df853675958fd522016810c (patch)
tree8edacac989817a4567c5affc93694aeb7ff65d54 /perl-install
parente493243f413480eaab130284867a2fcb0f2b649d (diff)
downloaddrakx-backup-do-not-use-da94715e3d4e07486df853675958fd522016810c.tar
drakx-backup-do-not-use-da94715e3d4e07486df853675958fd522016810c.tar.gz
drakx-backup-do-not-use-da94715e3d4e07486df853675958fd522016810c.tar.bz2
drakx-backup-do-not-use-da94715e3d4e07486df853675958fd522016810c.tar.xz
drakx-backup-do-not-use-da94715e3d4e07486df853675958fd522016810c.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_any.pm12
-rw-r--r--perl-install/install_steps_interactive.pm8
-rw-r--r--perl-install/mouse.pm3
4 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index cbc7cc200..5226bbbab 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -533,7 +533,7 @@ sub main {
add2hash(network::findIntf($o->{intf} ||= [], $l->{DEVICE}), $l);
}
- eval { run_program::run("rmmod", "vfat") };
+ modules::unload($_) foreach qw(vfat msdos fat);
modules::load_deps("/modules/modules.dep");
modules::read_stage1_conf("/tmp/conf.modules");
modules::read_already_loaded();
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 78f3d51ca..8d0495323 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -21,6 +21,7 @@ use partition_table_raw;
use devices;
use fsedit;
use network;
+use modules;
use lilo;
use detect_devices;
use pkgs;
@@ -333,8 +334,10 @@ sub killCardServices {
sub ejectCdrom() {
cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage|;
- my $f = eval { detect_devices::tryOpen($1) } or next;
- ioctl $f, c::CDROM_LOCKDOOR(), 0;
+ my $f = eval { detect_devices::tryOpen($1) } or return;
+ getFile("XXX"); #- close still opened filehandle
+ eval { fs::umount("/tmp/rhimage") };
+ ioctl $f, c::CDROM_LOCKDOOR(), 0; #- in case the umount fails...
ioctl $f, c::CDROMEJECT(), 1;
}
@@ -406,7 +409,7 @@ sub loadO {
-e $f or $f .= ".pl";
$o = loadO($O, $f);
fs::umount("/mnt") unless $::testing;
- eval { run_program::run("rmmod", "vfat") };
+ modules::unload($_) foreach qw(vfat fat);
} else {
-e $f or $f .= ".pl";
{
@@ -414,10 +417,11 @@ sub loadO {
open F, $f or die _("Error reading file $f");
local $/ = "\0";
+ no strict;
eval <F>;
}
$@ and log::l _("Bad kickstart file %s (failed %s)", $f, $@);
- add2hash_($o, $O);
+ add2hash_($o ||= {}, $O);
}
bless $o, ref $O;
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 81ba51710..5e8eb1c33 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -152,8 +152,8 @@ sub setupSCSI { setup_thiskind($_[0], 'scsi', $_[1], $_[2]) }
sub ask_mntpoint_s {
my ($o, $fstab) = @_;
my @fstab = grep { isExt2($_) } @$fstab;
- @fstab = grep { !isSwap($_) } @$fstab if @fstab == 0;
- @fstab = @$fstab if @fstab == 0;
+ @fstab = grep { isSwap($_) } @$fstab if @fstab == 0;
+# @fstab = @$fstab if @fstab == 0;
die _("no available partitions") if @fstab == 0;
my $msg = sub { "$_->{device} " . _("(%dMb)", $_->{size} / 1024 / 2) };
@@ -889,8 +889,6 @@ _("Some steps are not completed.
Do you really want to quit now?"), 0);
- $o->SUPER::exitInstall;
-
$o->ask_warn('',
_("Congratulations, installation is complete.
Remove the boot media and press return to reboot.
@@ -900,6 +898,8 @@ 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;
+
+ $o->SUPER::exitInstall;
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 6303d3b1a..9dd539623 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -12,6 +12,7 @@ use pci_probing::main;
use detect_devices;
use run_program;
use commands;
+use modules;
use log;
my @mouses_fields = qw(nbuttons device MOUSETYPE XMOUSETYPE FULLNAME);
@@ -91,7 +92,7 @@ sub detect() {
my %l;
eval { commands::modprobe("serial") };
@l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
- eval { run_program::run("rmmod", "serial") };
+ modules::unload("serial");
if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
eval { modules::load($c->[1], 'usbmouse') };