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 | da384d8b402efc33dbd82642d1ed6b924c5ddf55 (patch) | |
tree | f06c392392af8b888e4b7fe24c25bc7697fe41dd /perl-install | |
parent | 9a35db777418cfc5aef45bf380e158b5b7ee1f27 (diff) | |
download | drakx-backup-do-not-use-da384d8b402efc33dbd82642d1ed6b924c5ddf55.tar drakx-backup-do-not-use-da384d8b402efc33dbd82642d1ed6b924c5ddf55.tar.gz drakx-backup-do-not-use-da384d8b402efc33dbd82642d1ed6b924c5ddf55.tar.bz2 drakx-backup-do-not-use-da384d8b402efc33dbd82642d1ed6b924c5ddf55.tar.xz drakx-backup-do-not-use-da384d8b402efc33dbd82642d1ed6b924c5ddf55.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')
-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); |