From 31c599c27d11d6b1c9a9407b99839b79eea94a99 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 1 Jun 2005 04:05:36 +0000 Subject: set the LABEL after formatting, or drop it if we don't know how to set it --- perl-install/fs/format.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'perl-install/fs') 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); } -- cgit v1.2.1