summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-06 18:32:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-06 18:32:24 +0000
commitf704f15c0b6d2c5855185357611de81e0474cfbb (patch)
treec1113b00b281aa7a6036699a3e928bb133912357 /perl-install
parent0d5483b8c9fb77e640221833b22a0353434e1e6a (diff)
downloaddrakx-f704f15c0b6d2c5855185357611de81e0474cfbb.tar
drakx-f704f15c0b6d2c5855185357611de81e0474cfbb.tar.gz
drakx-f704f15c0b6d2c5855185357611de81e0474cfbb.tar.bz2
drakx-f704f15c0b6d2c5855185357611de81e0474cfbb.tar.xz
drakx-f704f15c0b6d2c5855185357611de81e0474cfbb.zip
(mount): do not fsck.ext2 when mounting readonly
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 42c0a9bee..be5d5c889 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -696,15 +696,19 @@ sub mount {
die "fsck.jfs failed" if $err & 0xfc00;
};
} elsif ($fs eq 'ext2' || $fs eq 'ext3' && $::isInstall) {
- foreach ('-a', '-y') {
- run_program::raw({ timeout => 60 * 60 }, "fsck.ext2", $_, $dev);
- my $err = $?;
- if ($err & 0x0100) { log::l("fsck corrected partition $dev") }
- if ($err & 0xfeff) {
- my $txt = sprintf("fsck failed on %s with exit code %d or signal %d", $dev, $err >> 8, $err & 255);
- $_ eq '-y' ? die($txt) : cdie($txt);
- } else {
- last;
+ if (!$rdonly) {
+ foreach ('-a', '-y') {
+ run_program::raw({ timeout => 60 * 60 }, "fsck.ext2", $_, $dev);
+ my $err = $?;
+ if ($err & 0x0100) {
+ log::l("fsck corrected partition $dev");
+ }
+ if ($err & 0xfeff) {
+ my $txt = sprintf("fsck failed on %s with exit code %d or signal %d", $dev, $err >> 8, $err & 255);
+ $_ eq '-y' ? die($txt) : cdie($txt);
+ } else {
+ last;
+ }
}
}
# really mount as ext2 during install for speed up