summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-02-10 10:40:10 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-02-10 10:40:10 +0000
commitc097f8d3f8db70685b3c7df6d6035ad47d50d9a0 (patch)
tree9356addc42c924a864e30d244d6037dbffbf41d1 /perl-install
parentbdf616f404eb81f2a6456ab95a3851df0cb3aaf7 (diff)
downloaddrakx-c097f8d3f8db70685b3c7df6d6035ad47d50d9a0.tar
drakx-c097f8d3f8db70685b3c7df6d6035ad47d50d9a0.tar.gz
drakx-c097f8d3f8db70685b3c7df6d6035ad47d50d9a0.tar.bz2
drakx-c097f8d3f8db70685b3c7df6d6035ad47d50d9a0.tar.xz
drakx-c097f8d3f8db70685b3c7df6d6035ad47d50d9a0.zip
fix preserving UUID when formatting ext* and swap, and handle more FS (#39913)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/fs/format.pm14
-rw-r--r--perl-install/install/NEWS1
3 files changed, 15 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 6c5f76cc4..5c638af04 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- diskdrake:
o forget the changed label when the user cancels
+ o fix preserving UUID when formatting ext* and swap, and handle more FS (#39913)
- localedrake:
o set scim-thai as default IM for Thai
- drakboot:
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm
index 4a2b31405..6a7a0856b 100644
--- a/perl-install/fs/format.pm
+++ b/perl-install/fs/format.pm
@@ -151,8 +151,13 @@ sub part_raw {
push @options, '-l', "Untitled";
} elsif (isAppleBootstrap($part)) {
push @options, '-l', 'bootstrap';
- } elsif (member($fs_type, 'swap', 'ext2', 'ext3', 'ext4')) {
+ }
+
+ # Preserve UUID
+ if (member($fs_type, 'swap', 'ext2', 'ext3', 'ext4')) {
push @options, '-U', $part->{device_UUID} if $part->{device_UUID};
+ } elsif ($fs_type eq 'reiserfs') {
+ push @options, '-u', $part->{device_UUID} if $part->{device_UUID};
}
if ($part->{device_LABEL}) {
@@ -169,6 +174,13 @@ sub part_raw {
run_program::raw({ timeout => 'never' }, @args) or die N("%s formatting of %s failed", $fs_type, $dev);
}
+ # 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));
+ }
+
if (member($fs_type, qw(ext3 ext4))) {
disable_forced_fsck($dev);
}
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 94db177a3..a26257ae2 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,6 @@
- when installing to a removable device, put boot sector there, else
put it into first non removable drive (#47106)
+- fix preserving UUID when formatting ext* and swap, and handle more FS (#39913)
Version 11.83 - 6 February 2009