summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/format.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-01 04:05:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-01 04:05:36 +0000
commit31c599c27d11d6b1c9a9407b99839b79eea94a99 (patch)
tree11e9fab5eda88f65e04ffde2db17acb4ce784e43 /perl-install/fs/format.pm
parent0bb3c1756eaf0d3207278eee90bf510eb974712e (diff)
downloaddrakx-31c599c27d11d6b1c9a9407b99839b79eea94a99.tar
drakx-31c599c27d11d6b1c9a9407b99839b79eea94a99.tar.gz
drakx-31c599c27d11d6b1c9a9407b99839b79eea94a99.tar.bz2
drakx-31c599c27d11d6b1c9a9407b99839b79eea94a99.tar.xz
drakx-31c599c27d11d6b1c9a9407b99839b79eea94a99.zip
set the LABEL after formatting, or drop it if we don't know how to set it
Diffstat (limited to 'perl-install/fs/format.pm')
-rw-r--r--perl-install/fs/format.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm
index 1b7b977cd..ce4d7e73a 100644
--- a/perl-install/fs/format.pm
+++ b/perl-install/fs/format.pm
@@ -93,6 +93,14 @@ sub part_raw {
if ($fs_type eq 'ext3') {
disable_forced_fsck($dev);
}
+ if ($part->{device_LABEL}) {
+ if (member($fs_type, qw(ext2 ext3))) {
+ run_program::run("tune2fs", "-L", $part->{device_LABEL}, devices::make($dev));
+ } else {
+ log::l("dropping LABEL=$part->{device_LABEL} since we don't know how to set labels for fs_type $part->{fs_type}");
+ delete $part->{device_LABEL}, $part->{prefer_device_LABEL};
+ }
+ }
set_isFormatted($part, 1);
}