summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/diskdrake/interactive.pm37
-rw-r--r--perl-install/fsedit.pm5
2 files changed, 14 insertions, 28 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 3f0e7d30b..ef10b3a6d 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -587,18 +587,19 @@ sub Mount_point {
isLoopback($part) ? N("Where do you want to mount the loopback file %s?", $part->{loopback_file}) :
N("Where do you want to mount device %s?", $part->{device}),
focus_first => 1,
- },
- [ { label => N("Mount point"), val => \$mntpoint,
- list => [ uniq(if_($mntpoint, $mntpoint), fsedit::suggestions_mntpoint($all_hds), '') ],
- not_edit => 0 } ],
- complete => sub {
+ callbacks => {
+ complete => sub {
!isPartOfLoopback($part) || $mntpoint or $in->ask_warn('',
N("Can't unset mount point as this partition is used for loop back.
Remove the loopback first")), return 1;
$part->{mntpoint} eq $mntpoint || check_mntpoint($in, $mntpoint, $hd, $part, $all_hds) or return 1;
$migrate_files = need_migration($in, $mntpoint) or return 1;
0;
- }
+ } },
+ },
+ [ { label => N("Mount point"), val => \$mntpoint,
+ list => [ uniq(if_($mntpoint, $mntpoint), fsedit::suggestions_mntpoint($all_hds), '') ],
+ not_edit => 0 } ],
) or return;
$part->{mntpoint} = $mntpoint;
@@ -1013,27 +1014,11 @@ sub check_type {
sub check_mntpoint {
my ($in, $mntpoint, $hd, $part, $all_hds) = @_;
eval { fsedit::check_mntpoint($mntpoint, $hd, $part, $all_hds) };
- local $_ = $@;
- if (m|/boot ending on cylinder > 1024|) {
- $in->ask_warn('',
-N("Sorry I won't accept to create /boot so far onto the drive (on a cylinder > 1024).
-Either you use LILO and it won't work, or you don't use LILO and you don't need /boot"));
- } elsif (m|/ ending on cylinder > 1024|) {
- $in->ask_warn('',
-N("The partition you've selected to add as root (/) is physically located beyond
-the 1024th cylinder of the hard drive, and you have no /boot partition.
-If you plan to use the LILO boot manager, be careful to add a /boot partition"));
- undef $_;
- } elsif (m|raid / with no /boot|) {
- $in->ask_warn('',
-N("You've selected a software RAID partition as root (/).
-No bootloader is able to handle this without a /boot partition.
-Please be sure to add a /boot partition"));
- undef $_;
- } elsif ($_) {
- $in->ask_warn('', formatError($_));
+ if (my $err = $@) {
+ $in->ask_warn('', formatError($err));
+ return;
}
- !$_;
+ 1;
}
sub check {
my ($in, $hd, $part, $all_hds) = @_;
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 72d87e7d8..10bc974df 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -529,8 +529,9 @@ sub check_mntpoint {
$mntpoint =~ m|^/| or die \N("Mount points must begin with a leading /");
$mntpoint ne $part->{mntpoint} && has_mntpoint($mntpoint, $all_hds) and die \N("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);
+ die \N("You've selected a software RAID partition as root (/).
+No bootloader is able to handle this without a /boot partition.
+Please be sure to add a /boot partition") if $mntpoint eq "/" && isRAID($part) && !has_mntpoint("/boot", $all_hds);
die \N("You can't use a LVM Logical Volume for mount point %s", $mntpoint)
if $mntpoint eq '/boot' && isLVM($hd);
die \N("This directory should remain within the root filesystem")