summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-04 23:37:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-04 23:37:08 +0000
commitc718e2dfd677b2d3e6acce231eecd2632c5ac5e0 (patch)
tree536dd6dd9ec83f70025679aa990c3c1afcc48df1 /perl-install/fs.pm
parent4eeb677b836ce75355b1a555796e6ecb0fddb89f (diff)
downloaddrakx-backup-do-not-use-c718e2dfd677b2d3e6acce231eecd2632c5ac5e0.tar
drakx-backup-do-not-use-c718e2dfd677b2d3e6acce231eecd2632c5ac5e0.tar.gz
drakx-backup-do-not-use-c718e2dfd677b2d3e6acce231eecd2632c5ac5e0.tar.bz2
drakx-backup-do-not-use-c718e2dfd677b2d3e6acce231eecd2632c5ac5e0.tar.xz
drakx-backup-do-not-use-c718e2dfd677b2d3e6acce231eecd2632c5ac5e0.zip
add ext3 support
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm21
1 files changed, 10 insertions, 11 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 167b0b383..9973c5780 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -89,6 +89,11 @@ sub format_ext2($@) {
run_program::run("mke2fs", @options, devices::make($dev)) or die _("%s formatting of %s failed", "ext2", $dev);
}
+sub format_ext3 {
+ my ($dev, @options) = @_;
+ format_ext2($dev, "-j", @options);
+}
+
sub format_reiserfs($@) {
my ($dev, @options) = @_;
@@ -131,6 +136,8 @@ sub real_format_part {
if (isExt2($part)) {
push @options, "-F" if isLoopback($part);
format_ext2($part->{device}, @options);
+ } elsif (isThisFs("ext3", $part)) {
+ format_ext3($part->{device}, @options);
} elsif (isThisFs("reiserfs", $part)) {
format_reiserfs($part->{device}, @options, if_(c::kernel_version() =~ /^\Q2.2/, "-v", "1"));
} elsif (isThisFs("xfs", $part)) {
@@ -221,27 +228,19 @@ sub mount($$$;$) {
$mount_opt = 'check=relaxed';
eval { modules::load('vfat') }; #- try using vfat
eval { modules::load('msdos') } if $@; #- otherwise msdos...
- } elsif ($fs eq 'hfs') {
- eval { modules::load('hfs') };
- } elsif ($fs eq 'ufs') {
- eval { modules::load('ufs') };
- } elsif ($fs eq 'xfs') {
- eval { modules::load('xfs') };
- } elsif ($fs eq 'jfs') {
- eval { modules::load('jfs') };
} elsif ($fs eq 'reiserfs') {
#- could be better if we knew if there is a /boot or not
#- without knowing it, / is forced to be mounted with notail
# if $where =~ m|/(boot)?$|;
$mount_opt = 'notail'; #- notail in any case
- eval { modules::load('reiserfs') };
- } elsif ($fs eq 'romfs') {
- eval { modules::load('romfs') };
} elsif ($fs eq 'ext2') {
run_program::run("fsck.ext2", "-a", $dev);
$? & 0x0100 and log::l("fsck corrected partition $dev");
$? & 0xfeff and die _("fsck failed with exit code %d or signal %d", $? >> 8, $? & 255);
}
+ if (member($fs, qw(hfs romfs ufs reiserfs xfs jfs ext3))) {
+ eval { modules::load($fs) };
+ }
$where =~ s|/$||;
log::l("calling mount($dev, $where, $fs, $flag, $mount_opt)");