summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-03-18 17:35:41 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-03-18 17:35:41 +0000
commit80bb927591ba3249b38e5e7da8fddd28a45e948e (patch)
tree611ddd94f37055bd9e3e881986fc057f6f435b90 /perl-install/fs
parentb1ec22fdf3c6be460b6759d79433e81fea593da3 (diff)
downloaddrakx-80bb927591ba3249b38e5e7da8fddd28a45e948e.tar
drakx-80bb927591ba3249b38e5e7da8fddd28a45e948e.tar.gz
drakx-80bb927591ba3249b38e5e7da8fddd28a45e948e.tar.bz2
drakx-80bb927591ba3249b38e5e7da8fddd28a45e948e.tar.xz
drakx-80bb927591ba3249b38e5e7da8fddd28a45e948e.zip
diskdrake:
o write partition table if needed before setting label o fix setting label on not yet formatted partition
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/format.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm
index 6a7a0856b..509134b17 100644
--- a/perl-install/fs/format.pm
+++ b/perl-install/fs/format.pm
@@ -109,7 +109,7 @@ sub write_label {
my ($part) = @_;
$part->{device_LABEL_changed} or return;
- $part->{isNotFormatted} and return;
+ maybeFormatted($part) or return;
if ($part->{encrypt_key}) {
fs::mount::set_loop($part);
@@ -123,7 +123,7 @@ sub write_label {
} else {
@args = ($cmd, devices::make($dev), $part->{device_LABEL});
}
- run_program::raw({ timeout => 'never' }, @args) or die N("setting label on %s failed", $dev);
+ run_program::raw({ timeout => 'never' }, @args) or die N("setting label on %s failed, is it formatted?", $dev);
delete $part->{device_LABEL_changed};
}
@@ -174,6 +174,8 @@ sub part_raw {
run_program::raw({ timeout => 'never' }, @args) or die N("%s formatting of %s failed", $fs_type, $dev);
}
+ delete $part->{device_LABEL_changed};
+
# Preserve UUID on fs where we couldn't enforce it while formatting
if ($fs_type eq 'jfs') {
run_program::raw('jfs_tune', '-U', devices::make($dev));