summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-10-07 09:48:03 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-10-07 09:48:03 +0000
commitdd962c22f7e02d9bbcc7f62c515d4c2ab7b1fdf3 (patch)
tree637e40c85752c76c9af8d63c61e0eb3e1fbe235f
parent4b06a8a57d52b7d5447a1b487b8d33e36b4121b7 (diff)
downloaddrakx-dd962c22f7e02d9bbcc7f62c515d4c2ab7b1fdf3.tar
drakx-dd962c22f7e02d9bbcc7f62c515d4c2ab7b1fdf3.tar.gz
drakx-dd962c22f7e02d9bbcc7f62c515d4c2ab7b1fdf3.tar.bz2
drakx-dd962c22f7e02d9bbcc7f62c515d4c2ab7b1fdf3.tar.xz
drakx-dd962c22f7e02d9bbcc7f62c515d4c2ab7b1fdf3.zip
- factorize default FS definition
- switch to ext4 by default
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/diskdrake/interactive.pm4
-rw-r--r--perl-install/fs/dmcrypt.pm2
-rw-r--r--perl-install/fs/type.pm4
-rw-r--r--perl-install/fsedit.pm24
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/raid.pm4
7 files changed, 23 insertions, 18 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 50cbd90b2..4d6751645 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,7 @@
- add back ram devices support (used by draklive)
- do not set mountpoints for rescue partitions (#53504)
+- factorize default FS definition
+- switch to ext4 by default
Version 12.58 - 5 October 2009
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index b37f9f4d5..acf372a18 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -465,7 +465,7 @@ sub Create {
$part->{mntpoint} = '' if !$do_suggest_mount_point;
} else {
$part->{size} = $part->{maxsize};
- fs::type::suggest_fs_type($part, 'ext3');
+ fs::type::suggest_fs_type($part, defaultFS());
}
if (isLVM($hd)) {
lvm::suggest_lv_name($hd, $part);
@@ -964,7 +964,7 @@ sub Loopback {
my $part = { maxsize => $max, size => 0, loopback_device => $real_part, notFormatted => 1 };
if (!fsedit::suggest_part($part, $all_hds)) {
$part->{size} = $part->{maxsize};
- fs::type::suggest_fs_type($part, 'ext3');
+ fs::type::suggest_fs_type($part, defaultFS());
}
delete $part->{mntpoint}; # we do not want the suggested mntpoint
diff --git a/perl-install/fs/dmcrypt.pm b/perl-install/fs/dmcrypt.pm
index d79464c35..e817edd23 100644
--- a/perl-install/fs/dmcrypt.pm
+++ b/perl-install/fs/dmcrypt.pm
@@ -124,7 +124,7 @@ sub _get_existing_one {
}
fs::type::set_isFormatted($part, to_bool($part->{fs_type}));
- $part->{fs_type} or fs::type::set_fs_type($part, 'ext3');
+ $part->{fs_type} or fs::type::set_fs_type($part, defaultFS());
log::l("dmcrypt: found $part->{device} type $part->{fs_type} with rootDevice $part->{rootDevice}");
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index 244c7126d..80176f15a 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -10,7 +10,7 @@ use devices;
our @ISA = qw(Exporter);
our @EXPORT = qw(
isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isFat_or_NTFS isRecovery
- maybeFormatted set_isFormatted
+ maybeFormatted set_isFormatted defaultFS
);
@@ -309,6 +309,8 @@ sub type_subpart_from_magic {
$p;
}
+sub defaultFS { 'ext4' }
+
sub true_local_fs_types() { qw(ext3 ext2 ext4 reiserfs reiser4 xfs jfs) }
sub isEmpty { !$_[0]{fs_type} && $_[0]{pt_type} == 0 }
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index b3acb649a..5c796bafd 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -22,21 +22,21 @@ use fs;
# min_hd_size: only suggest this partition if the hd size is bigger than that
%suggestions = (
N_("simple") => [
- { mntpoint => "/", size => MB(300), fs_type => 'ext3', ratio => 10, maxsize => MB(12300) },
+ { mntpoint => "/", size => MB(300), fs_type => defaultFS(), ratio => 10, maxsize => MB(12300) },
{ mntpoint => "swap", size => MB(128), fs_type => 'swap', ratio => 1, maxsize => MB(4000) },
- { mntpoint => "/home", size => MB(300), fs_type => 'ext3', ratio => 8, min_hd_size => MB(8000) },
+ { mntpoint => "/home", size => MB(300), fs_type => defaultFS(), ratio => 8, min_hd_size => MB(8000) },
], N_("with /usr") => [
- { mntpoint => "/", size => MB(250), fs_type => 'ext3', ratio => 1, maxsize => MB(8000) },
+ { mntpoint => "/", size => MB(250), fs_type => defaultFS(), ratio => 1, maxsize => MB(8000) },
{ mntpoint => "swap", size => MB(64), fs_type => 'swap', ratio => 1, maxsize => MB(4000) },
- { mntpoint => "/usr", size => MB(300), fs_type => 'ext3', ratio => 4, maxsize => MB(8000) },
- { mntpoint => "/home", size => MB(100), fs_type => 'ext3', ratio => 3, min_hd_size => MB(7000) },
+ { mntpoint => "/usr", size => MB(300), fs_type => defaultFS(), ratio => 4, maxsize => MB(8000) },
+ { mntpoint => "/home", size => MB(100), fs_type => defaultFS(), ratio => 3, min_hd_size => MB(7000) },
], N_("server") => [
- { mntpoint => "/", size => MB(150), fs_type => 'ext3', ratio => 1, maxsize => MB(8000) },
+ { mntpoint => "/", size => MB(150), fs_type => defaultFS(), ratio => 1, maxsize => MB(8000) },
{ mntpoint => "swap", size => MB(64), fs_type => 'swap', ratio => 2, maxsize => MB(4000) },
- { mntpoint => "/usr", size => MB(300), fs_type => 'ext3', ratio => 4, maxsize => MB(8000) },
- { mntpoint => "/var", size => MB(200), fs_type => 'ext3', ratio => 3 },
- { mntpoint => "/home", size => MB(150), fs_type => 'ext3', ratio => 3, min_hd_size => MB(7000) },
- { mntpoint => "/tmp", size => MB(150), fs_type => 'ext3', ratio => 2, maxsize => MB(4000) },
+ { mntpoint => "/usr", size => MB(300), fs_type => defaultFS(), ratio => 4, maxsize => MB(8000) },
+ { mntpoint => "/var", size => MB(200), fs_type => defaultFS(), ratio => 3 },
+ { mntpoint => "/home", size => MB(150), fs_type => defaultFS(), ratio => 3, min_hd_size => MB(7000) },
+ { mntpoint => "/tmp", size => MB(150), fs_type => defaultFS(), ratio => 2, maxsize => MB(4000) },
],
);
foreach (values %suggestions) {
@@ -444,9 +444,9 @@ You should create a /boot partition first") if $mntpoint eq "/" && isLVM($part)
if member($mntpoint, qw(/root));
die N("This directory should remain within the root filesystem")
if member($mntpoint, qw(/bin /dev /etc /lib /sbin /mnt /media));
- die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
+ die N("You need a true filesystem (ext2/3/4, reiserfs, xfs, or jfs) for this mount point\n")
if !isTrueLocalFS($part) && $mntpoint eq '/';
- die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
+ die N("You need a true filesystem (ext2/3/4, reiserfs, xfs, or jfs) for this mount point\n")
if !isTrueFS($part) && member($mntpoint, '/home', fs::type::directories_needed_to_boot());
die N("You can not use an encrypted file system for mount point %s", $mntpoint)
if $part->{options} =~ /encrypted/ && member($mntpoint, qw(/ /usr /var /boot));
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 936496f5f..befea86ca 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,5 @@
- do not set mountpoints for rescue partitions (#53504)
+- switch to ext4 by default
Version 12.58 - 05 October 2009
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index e681a4649..93ec9748e 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -24,7 +24,7 @@ sub new {
my ($raids, %opts) = @_;
my $md_part = { %opts };
add2hash_($md_part, { 'chunk-size' => '64', disks => [],
- fs_type => 'ext3',
+ fs_type => defaultFS(),
device => first(free_mds($raids)),
notFormatted => 1, level => 1 });
push @$raids, $md_part;
@@ -229,7 +229,7 @@ sub get_existing {
if ($type) {
put_in_hash($md_part, $type);
} else {
- fs::type::set_fs_type($md_part, 'ext3');
+ fs::type::set_fs_type($md_part, defaultFS());
}
my $fs_type = $type && $type->{fs_type};
fs::type::set_isFormatted($md_part, to_bool($fs_type));