diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-10-28 09:41:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-10-28 09:41:32 +0000 |
commit | f438f4f5caf143c0c6f263e09c9702b6876b91cf (patch) | |
tree | c4195a73c64e7ed42531a8b0ca997d0fec60b544 /perl-install/fs.pm | |
parent | b4a722c16e9be060fac6a9e5bb14ee43ea048163 (diff) | |
download | drakx-backup-do-not-use-f438f4f5caf143c0c6f263e09c9702b6876b91cf.tar drakx-backup-do-not-use-f438f4f5caf143c0c6f263e09c9702b6876b91cf.tar.gz drakx-backup-do-not-use-f438f4f5caf143c0c6f263e09c9702b6876b91cf.tar.bz2 drakx-backup-do-not-use-f438f4f5caf143c0c6f263e09c9702b6876b91cf.tar.xz drakx-backup-do-not-use-f438f4f5caf143c0c6f263e09c9702b6876b91cf.zip |
no_comment
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r-- | perl-install/fs.pm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 5625e0f80..691c10ce6 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -58,36 +58,35 @@ sub get_mntpoints_from_fstab($) { } sub format_ext2($;$) { - my ($dev, $bad_blocks) = @_; - my @options; + my ($dev, @options) = @_; $dev =~ m,(rd|ida)/, and push @options, qw(-b 4096 -R stride=16); #- For RAID only. - $bad_blocks and push @options, "-c"; run_program::run("mke2fs", devices::make($dev), @options) or die _("%s formatting of %s failed", "ext2", $dev); } sub format_dos($;$@) { - my ($dev, $bad_blocks, @options) = @_; + my ($dev, @options) = @_; - run_program::run("mkdosfs", devices::make($dev), @options, $bad_blocks ? "-c" : ()) or die _("%s formatting of %s failed", "dos", $dev); + run_program::run("mkdosfs", devices::make($dev), @options) or die _("%s formatting of %s failed", "dos", $dev); } -sub format_part($;$) { - my ($part, $bad_blocks) = @_; +sub format_part($;$@) { + my ($part, @options) = @_; $part->{isFormatted} and return; log::l("formatting device $part->{device} (type ", type2name($part->{type}), ")"); if (isExt2($part)) { - format_ext2($part->{device}, $bad_blocks); + format_ext2($part->{device}, @options); } elsif (isDos($part)) { - format_dos($part->{device}, $bad_blocks); + format_dos($part->{device}, @options); } elsif (isWin($part)) { - format_dos($part->{device}, $bad_blocks, '-F', 32); + format_dos($part->{device}, @options, '-F', 32); } elsif (isSwap($part)) { - swap::make($part->{device}, $bad_blocks); + my $check_blocks = grep { /^-c$/ } @options; + swap::make($part->{device}, $check_blocks); } else { die _("don't know how to format %s in type %s", $_->{device}, type2name($_->{type})); } @@ -233,6 +232,7 @@ sub write_fstab($;$$) { @new{($_->{mntpoint}, $_->{"$dir$_->{device}"})} = undef; eval { devices::make("$prefix/$dir$_->{device}") } if $_->{device} && $dir; + mkdir "$prefix/$_->{mntpoint}", 0755 if $_->{mntpoint}; [ "$dir$_->{device}", $_->{mntpoint}, type2fs($_->{type}), $options, $freq, $passno ]; |