summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
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/install_any.pm
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/install_any.pm')
-rw-r--r--perl-install/install_any.pm12
1 files changed, 8 insertions, 4 deletions
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;
}