summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/format.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
commit126777bc019a54afb4ec51299f2cf9d2841698aa (patch)
tree97f76e571902ead55ba138f1156a4b4f00b9b779 /perl-install/fs/format.pm
parentf1f67448efc714873378dfeb8279fae68054a90a (diff)
downloaddrakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.gz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.bz2
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.xz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.zip
re-sync after the big svn loss
Diffstat (limited to 'perl-install/fs/format.pm')
-rw-r--r--perl-install/fs/format.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm
index f342be09f..c1b6dc05b 100644
--- a/perl-install/fs/format.pm
+++ b/perl-install/fs/format.pm
@@ -2,6 +2,7 @@ package fs::format; # $Id$
use diagnostics;
use strict;
+use String::ShellQuote;
use run_program;
use common;
@@ -20,6 +21,7 @@ my %cmds = (
dos => [ 'dosfstools', 'mkdosfs' ],
vfat => [ 'dosfstools', 'mkdosfs', '-F', '32' ],
swap => [ 'util-linux', 'mkswap' ],
+ ntfs => [ 'ntfsprogs', 'mkntfs' ],
);
my %LABELs = ( #- option, length, handled_by_mount
@@ -119,7 +121,7 @@ sub part_raw {
if ($cmd eq 'mkfs.ext2' && $wait_message) {
mkfs_ext2($wait_message, @args) or die N("%s formatting of %s failed", $fs_type, $dev);
} else {
- run_program::raw({ timeout => 60 * 60 }, @args) or die N("%s formatting of %s failed", $fs_type, $dev);
+ run_program::raw({ timeout => 'never' }, @args) or die N("%s formatting of %s failed", $fs_type, $dev);
}
if ($fs_type eq 'ext3') {
@@ -132,7 +134,9 @@ sub part_raw {
sub mkfs_ext2 {
my ($wait_message, @args) = @_;
- open(my $F, "@args |");
+ my $cmd = shell_quote_best_effort(@args);
+ log::l("running: $cmd");
+ open(my $F, "$cmd |");
local $/ = "\b";
local $_;
@@ -160,6 +164,14 @@ sub formatMount_part {
if ($part->{toFormat}) {
fs::format::part($all_hds, $part, $wait_message);
}
+
+ #- setting user_xattr on /home (or "/" if no /home)
+ if (!$part->{isMounted} && $part->{fs_type} eq 'ext3'
+ && ($part->{mntpoint} eq '/home' ||
+ !fs::get::has_mntpoint('/home', $all_hds) && $part->{mntpoint} eq '/')) {
+ run_program::run('tune2fs', '-o', 'user_xattr', devices::make($part->{real_device} || $part->{device}));
+ }
+
fs::mount::part($part, 0, $wait_message);
}