summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/fs.pm11
-rw-r--r--perl-install/install2.pm6
-rw-r--r--perl-install/install_any.pm6
-rw-r--r--perl-install/install_steps.pm3
-rw-r--r--perl-install/install_steps_interactive.pm4
-rw-r--r--perl-install/pkgs.pm4
6 files changed, 22 insertions, 12 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 1a81a238a..8634f0343 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -95,8 +95,8 @@ sub format_part($;$@) {
$part->{isFormatted} = 1;
}
-sub mount($$$;$) {
- my ($dev, $where, $fs, $rdonly) = @_;
+sub mount($$$;$$) {
+ my ($dev, $where, $fs, $rdonly, $remount) = @_;
log::l("mounting $dev on $where as type $fs");
-d $where or commands::mkdir_('-p', $where);
@@ -111,6 +111,7 @@ sub mount($$$;$) {
my $flag = 0;#c::MS_MGC_VAL();
$flag |= c::MS_RDONLY() if $rdonly;
+ $flag |= c::MS_REMOUNT() if $remount;
my $mount_opt = "";
if ($fs eq 'vfat') {
@@ -139,8 +140,8 @@ sub umount($) {
foreach (@mtab) { print F $_ unless /(^|\s)$mntpoint\s/; }
}
-sub mount_part($;$$) {
- my ($part, $prefix, $rdonly) = @_;
+sub mount_part($;$$$) {
+ my ($part, $prefix, $rdonly, $remount) = @_;
$part->{isMounted} and return;
@@ -148,7 +149,7 @@ sub mount_part($;$$) {
swap::swapon($part->{device});
} else {
$part->{mntpoint} or die "missing mount point";
- mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly);
+ mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly, $remount);
}
$part->{isMounted} = $part->{isFormatted} = 1; #- assume that if mount works, partition is formatted
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 08f6cf86f..d80d6625f 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -574,6 +574,12 @@ sub main {
install_any::lnx4win_postinstall($o->{prefix}) if $o->{lnx4win};
install_any::killCardServices();
+ #- ala pixel? :-) [fpons]
+ sync(); sync();
+
+ #- remounting read-only may avoid error if kernel is unable to umount fs.
+ install_any::remount_readonly($o, $o->{prefix});
+
log::l("installation complete, leaving");
print "\n" x 30;
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index ef36e6fca..aa9107456 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -244,6 +244,12 @@ sub searchAndMount4Upgrade {
}
}
+sub remount_readonly {
+ my ($o, $dir) = @_;
+ my $device = first(grep { $_->{mntpoint} eq $dir } @{$o->{fstab}});
+ eval { fs::mount_part($device, $device, 'readonly', 'remount') };
+}
+
sub write_ldsoconf {
my ($prefix) = @_;
my $file = "$prefix/etc/ld.so.conf";
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 9b3a080f0..2f5de3dbc 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -490,9 +490,6 @@ sub miscellaneous {
sub exitInstall {
install_any::unlockCdroms;
install_any::ejectCdrom;
-
- #- ala pixel? :-) [fpons]
- sync(); sync();
}
#-######################################################################################
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index d1f871c65..0e8571442 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -778,14 +778,14 @@ _("Append") => \$e->{append},
_("Initrd") => { val => \$e->{initrd}, list => [ eval { glob_("/boot/initrd*") } ] },
_("Read-write") => { val => \$e->{'read-write'}, type => 'bool' }
);
- @l = @l[0..5] if $::beginner;
+ @l = @l[0..5] unless $::expert;
} else {
@l = (
_("Root") => { val => \$name, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert },
_("Table") => { val => \$e->{table}, list => [ '', map { "/dev/$_->{device}" } @{$o->{hds}} ], not_edit => !$::expert },
_("Unsafe") => { val => \$e->{unsafe}, type => 'bool' }
);
- @l = @l[0..1] if $::beginner;
+ @l = @l[0..1] unless $::expert;
}
@l = (
_("Label") => \$e->{label},
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0179bf45d..cb12fdb8d 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -300,7 +300,7 @@ sub init_db {
my ($prefix, $isUpgrade) = @_;
my $f = "$prefix/root/install.log";
- open(LOG, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
+# open(LOG, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
*LOG or *LOG = log::F() or *LOG = *STDERR;
CORE::select((CORE::select(LOG), $| = 1)[0]);
c::rpmErrorSetCallback(fileno LOG);
@@ -315,7 +315,7 @@ sub init_db {
sub done_db {
log::l("closing install.log file");
- close LOG;
+ # close LOG;
}
sub getHeader($) {