diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-23 19:05:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-23 19:05:43 +0000 |
commit | 26b42039a96337599925b947b5f41e80286bbfe9 (patch) | |
tree | f06c392392af8b888e4b7fe24c25bc7697fe41dd /perl-install/fs/format.pm | |
parent | cbf7a0bf013fd2cd7cd72e7db812e0d9c7c00f72 (diff) | |
download | drakx-26b42039a96337599925b947b5f41e80286bbfe9.tar drakx-26b42039a96337599925b947b5f41e80286bbfe9.tar.gz drakx-26b42039a96337599925b947b5f41e80286bbfe9.tar.bz2 drakx-26b42039a96337599925b947b5f41e80286bbfe9.tar.xz drakx-26b42039a96337599925b947b5f41e80286bbfe9.zip |
(package_needed_for_partition_type) make more generic the ability to
preserve UUID on fses where we couldn't enforce it while formatting
Diffstat (limited to 'perl-install/fs/format.pm')
-rw-r--r-- | perl-install/fs/format.pm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm index 5fd0a76f9..0286653b3 100644 --- a/perl-install/fs/format.pm +++ b/perl-install/fs/format.pm @@ -66,6 +66,13 @@ my %edit_LABEL = ( # package, command, option nilfs2 => [ 'nilfs-utils', 'nilfs-tune', '-L' ], ); +# Preserve UUID on fs where we couldn't enforce it while formatting +my %preserve_UUID = ( # package, commande + #btrfs => [ 'btrfs-progs', 'FIXME' ], + jfs => [ 'jfsutils', 'jfs_tune', ], + xfs => [ 'xfsprogs', 'xfs_admin' ], +); + sub package_needed_for_partition_type { my ($part) = @_; my $l = $cmds{$part->{fs_type}} or return; @@ -188,13 +195,8 @@ sub part_raw { 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)); - } elsif ($fs_type eq 'xfs') { - run_program::raw('xfs_admin', '-U', devices::make($dev)); - } elsif ($fs_type eq 'btrfs') { - #FIXME - } + my ($_pkg, $cmd) = @{$preserve_UUID{$fs_type}}; + run_program::raw($cmd, '-U', devices::make($dev)) if $cmd; if (member($fs_type, qw(ext3 ext4))) { disable_forced_fsck($dev); |