summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-17 13:37:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-17 13:37:53 +0000
commit7c51f30621e904a6137a156f4e73a6209d648714 (patch)
tree7a54f4a05730cdb3fbe5ac53e14f853d4bcfce24 /perl-install
parentae298443cef09c4b4569101198edbc365873e468 (diff)
downloaddrakx-backup-do-not-use-7c51f30621e904a6137a156f4e73a6209d648714.tar
drakx-backup-do-not-use-7c51f30621e904a6137a156f4e73a6209d648714.tar.gz
drakx-backup-do-not-use-7c51f30621e904a6137a156f4e73a6209d648714.tar.bz2
drakx-backup-do-not-use-7c51f30621e904a6137a156f4e73a6209d648714.tar.xz
drakx-backup-do-not-use-7c51f30621e904a6137a156f4e73a6209d648714.zip
check the mountpoint is valid for encrypting (disallow "/" and "/usr")
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fsedit.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 90554f509..449893e8b 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -474,7 +474,7 @@ sub check_mntpoint {
$mntpoint eq '' || isSwap($part) || isNonMountable($part) and return;
$mntpoint =~ m|^/| or die _("Mount points must begin with a leading /");
- has_mntpoint($mntpoint, $all_hds) and die _("There is already a partition with mount point %s\n", $mntpoint);
+ $mntpoint ne $part->{mntpoint} && has_mntpoint($mntpoint, $all_hds) and die _("There is already a partition with mount point %s\n", $mntpoint);
die "raid / with no /boot"
if $mntpoint eq "/" && isRAID($part) && !has_mntpoint("/boot", $all_hds);
@@ -484,6 +484,8 @@ sub check_mntpoint {
if member($mntpoint, qw(/bin /dev /etc /lib /sbin));
die _("You need a true filesystem (ext2, reiserfs) for this mount point\n")
if !isTrueFS($part) && member($mntpoint, qw(/ /home /tmp /usr /var));
+ die _("You can't use an encrypted file system for mount point %s", $mntpoint)
+ if $part->{options} =~ /encrypted/ && member($mntpoint, qw(/ /usr));
local $part->{mntpoint} = $mntpoint;
loopback::check_circular_mounts($hd, $part, $all_hds);