summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-01-22 10:37:15 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-01-22 10:37:15 +0000
commit348c5f4eb2015dd237187cdb8fe71a98c16cf128 (patch)
treeeffdf7091761f8e63a3dbc6e91643380801fbd18 /perl-install/fs
parent5f630d8e45cd49fa6086b36cc1e1e01916de928b (diff)
downloaddrakx-348c5f4eb2015dd237187cdb8fe71a98c16cf128.tar
drakx-348c5f4eb2015dd237187cdb8fe71a98c16cf128.tar.gz
drakx-348c5f4eb2015dd237187cdb8fe71a98c16cf128.tar.bz2
drakx-348c5f4eb2015dd237187cdb8fe71a98c16cf128.tar.xz
drakx-348c5f4eb2015dd237187cdb8fe71a98c16cf128.zip
don't rewrite label when it did not change (#47186)
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/format.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm
index d621b6067..4a2b31405 100644
--- a/perl-install/fs/format.pm
+++ b/perl-install/fs/format.pm
@@ -108,7 +108,7 @@ sub part {
sub write_label {
my ($part) = @_;
- $part->{device_LABEL} or return;
+ $part->{device_LABEL_changed} or return;
$part->{isNotFormatted} and return;
if ($part->{encrypt_key}) {
@@ -124,6 +124,7 @@ sub write_label {
@args = ($cmd, devices::make($dev), $part->{device_LABEL});
}
run_program::raw({ timeout => 'never' }, @args) or die N("setting label on %s failed", $dev);
+ delete $part->{device_LABEL_changed};
}
sub part_raw {
@@ -222,6 +223,7 @@ sub clean_label {
log::l("dropping LABEL=$part->{device_LABEL} since we don't know how to set labels for fs_type $fs_type");
delete $part->{device_LABEL};
delete $part->{prefer_device_LABEL};
+ delete $part->{device_LABEL_changed};
}
}
}