summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-05-27 11:26:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-05-27 11:26:16 +0000
commit252041321d4ac8753e3083c71590291154dbe66e (patch)
treeb0c76318d995cac86b9df90aeaf557e7852d3989 /perl-install
parentec461fcdcda4fe7459a726f02112ff0a33c2d68f (diff)
downloaddrakx-backup-do-not-use-252041321d4ac8753e3083c71590291154dbe66e.tar
drakx-backup-do-not-use-252041321d4ac8753e3083c71590291154dbe66e.tar.gz
drakx-backup-do-not-use-252041321d4ac8753e3083c71590291154dbe66e.tar.bz2
drakx-backup-do-not-use-252041321d4ac8753e3083c71590291154dbe66e.tar.xz
drakx-backup-do-not-use-252041321d4ac8753e3083c71590291154dbe66e.zip
new function isTrueLocalFS() to make a distinction between ext3/reiserfs/... and nfs
=> allow /home on nfs (bugzilla #7460)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/fsedit.pm4
-rw-r--r--perl-install/install_interactive.pm2
-rw-r--r--perl-install/partition_table.pm7
4 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index ce31f1afc..c3efd2127 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -230,7 +230,7 @@ sub prepare_write_fstab {
my ($freq, $passno) =
exists $_->{freq} ?
($_->{freq}, $_->{passno}) :
- isTrueFS($_) && $_->{options} !~ /encryption=/ && !$_->{is_removable} ?
+ isTrueLocalFS($_) && $_->{options} !~ /encryption=/ && !$_->{is_removable} ?
(1, $_->{mntpoint} eq '/' ? 1 : loopback::carryRootLoopback($_) ? 0 : 2) :
(0, 0);
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 69b9bf826..cc6129991 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -561,7 +561,9 @@ Please be sure to add a /boot partition") if $mntpoint eq "/" && isLVM($part) &&
die N("This directory should remain within the root filesystem")
if member($mntpoint, qw(/bin /dev /etc /lib /sbin /mnt));
die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
- if !isTrueFS($part) && member($mntpoint, qw(/ /home /tmp /usr /var));
+ if !isTrueLocalFS($part) && $mntpoint eq '/';
+ die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
+ if !isTrueFS($part) && member($mntpoint, qw(/home /tmp /usr /var));
die N("You can't 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_interactive.pm b/perl-install/install_interactive.pm
index 69018db24..186397e37 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -100,7 +100,7 @@ sub partitionWizardSolutions {
"no harddrive on which partitions can be added");
}
- if (my @truefs = grep { isTrueFS($_) } @$fstab) {
+ if (my @truefs = grep { isTrueLocalFS($_) } @$fstab) {
#- value twice the ext2 partitions
$solutions{existing_part} = [ 6 + @truefs + @$fstab, N("Use existing partitions"), sub { $o->ask_mntpoint_s($fstab) } ]
} else {
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 45b3a7088..b8f96fb1a 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @important_types2 @fie
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isThisFs isTrueFS isSwap isDos isWin isFat isFat_or_NTFS isSunOS isOtherAvailableFS isPrimary isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial maybeFormatted isApple isAppleBootstrap isEfi) ],
+ types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isThisFs isTrueLocalFS isTrueFS isSwap isDos isWin isFat isFat_or_NTFS isSunOS isOtherAvailableFS isPrimary isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial maybeFormatted isApple isAppleBootstrap isEfi) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
@@ -255,7 +255,8 @@ sub isAppleBootstrap { type2fs($_[0]) eq 'apple' && defined $_[0]{isBoot} }
sub isHiddenMacPart { defined $_[0]{isMap} }
sub isThisFs { type2fs($_[1]) eq $_[0] }
-sub isTrueFS { member(type2fs($_[0]), qw(ext2 reiserfs xfs jfs ext3)) }
+sub isTrueFS { isTrueLocalFS($_[0]) || member(type2fs($_[0]), qw(nfs)) }
+sub isTrueLocalFS { member(type2fs($_[0]), qw(ext2 reiserfs xfs jfs ext3)) }
sub isOtherAvailableFS { isEfi($_[0]) || isFat_or_NTFS($_[0]) || isSunOS($_[0]) || isThisFs('hfs', $_[0]) } #- other OS that linux can access its filesystem
sub isMountableRW { (isTrueFS($_[0]) || isOtherAvailableFS($_[0])) && !isThisFs('ntfs', $_[0]) }
@@ -433,7 +434,7 @@ sub adjust_main_extended {
foreach (map { $_->{normal} } $l, @l) {
$start = min($start, $_->{start});
$end = max($end, $_->{start} + $_->{size});
- $only_linux &&= isTrueFS($_) || isSwap($_);
+ $only_linux &&= isTrueLocalFS($_) || isSwap($_);
$has_win_lba ||= $_->{type} == 0xc || $_->{type} == 0xe;
}
$l->{start} = $hd->{primary}{extended}{start} = $start;