summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-06-09 10:51:28 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-06-11 09:39:32 +0200
commit9e340d74e5196ef9e52a6790330ef68a00b55a57 (patch)
tree29cf360bba46cc41fe35bd9633b5e72f4063dca7
parent83565d0739e5746ea02c210106a2d1f1d1477eda (diff)
downloaddrakx-9e340d74e5196ef9e52a6790330ef68a00b55a57.tar
drakx-9e340d74e5196ef9e52a6790330ef68a00b55a57.tar.gz
drakx-9e340d74e5196ef9e52a6790330ef68a00b55a57.tar.bz2
drakx-9e340d74e5196ef9e52a6790330ef68a00b55a57.tar.xz
drakx-9e340d74e5196ef9e52a6790330ef68a00b55a57.zip
refactor for next commit
-rw-r--r--perl-install/fs/any.pm6
-rw-r--r--perl-install/fsedit.pm11
2 files changed, 12 insertions, 5 deletions
diff --git a/perl-install/fs/any.pm b/perl-install/fs/any.pm
index bd5f99b7e..5471980d2 100644
--- a/perl-install/fs/any.pm
+++ b/perl-install/fs/any.pm
@@ -67,8 +67,10 @@ sub check_hds_boot_and_root {
my ($all_hds, $fstab) = @_;
fs::get::root_($fstab) or die "Oops, no root partition";
- if (is_uefi() && !fs::get::has_mntpoint("/boot/EFI", $all_hds)) {
- die N("You must have a ESP FAT32 partition mounted in /boot/EFI");
+ if (is_uefi()) {
+ if (!fs::get::has_mntpoint("/boot/EFI", $all_hds)) {
+ die N("You must have a ESP FAT32 partition mounted in /boot/EFI");
+ }
}
}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 024d6f975..d67ce0856 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -47,11 +47,16 @@ sub init_efi_suggestions {
return if $done && !$o_force;
$done++;
+ my $mntpoint;
# only suggests /boot/EFI if there's not already one:
- return if !is_uefi() || grep { isESP($_) } @$fstab;
-
+ if (is_uefi()) {
+ if (!grep { isESP($_) } @$fstab) {
+ $mntpoint = { mntpoint => "/boot/EFI", size => MB(100), pt_type => 0xef, ratio => 1, maxsize => MB(300) };
+ }
+ }
+ return if !$mntpoint;
foreach (values %suggestions) {
- unshift @$_, { mntpoint => "/boot/EFI", size => MB(100), pt_type => 0xef, ratio => 1, maxsize => MB(300) };
+ unshift @$_, $mntpoint;
}
}