summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-03-16 12:54:59 +0100
committerThomas Backlund <tmb@mageia.org>2015-03-20 21:09:31 +0159
commit515ed30f0c4e82e737bf3a5b6933e603762e6f69 (patch)
tree924688f657e020545027a2918badab903adf5924 /perl-install/fsedit.pm
parent4367f1f8425cb24361b11d0f75e2e1f32a341452 (diff)
downloaddrakx-515ed30f0c4e82e737bf3a5b6933e603762e6f69.tar
drakx-515ed30f0c4e82e737bf3a5b6933e603762e6f69.tar.gz
drakx-515ed30f0c4e82e737bf3a5b6933e603762e6f69.tar.bz2
drakx-515ed30f0c4e82e737bf3a5b6933e603762e6f69.tar.xz
drakx-515ed30f0c4e82e737bf3a5b6933e603762e6f69.zip
do not suggests /boot/EFI uselessly (mga#15448)
we were creating another one when there was already one...
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index c99d4127d..23d2ac809 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -3,6 +3,7 @@ package fsedit;
use diagnostics;
use strict;
use vars qw(%suggestions);
+use feature 'state';
#-######################################################################################
#- misc imports
@@ -39,8 +40,17 @@ use fs;
{ mntpoint => "/tmp", size => MB(150), fs_type => defaultFS(), ratio => 2, maxsize => MB(4000) },
],
);
-foreach (values %suggestions) {
- if ( is_uefi() ) {
+
+sub init_efi_suggestions {
+ my ($fstab) = @_;
+ state $done;
+ return if $done;
+ $done++;
+
+ # only suggests /boot/EFI if there's not already one:
+ return if !is_uefi() || grep { isESP($_) } @$fstab;
+
+ foreach (values %suggestions) {
@$_ = ({ mntpoint => "/boot/EFI", size => MB(100), pt_type => 0xef, ratio => 1, maxsize => MB(300) }, @$_);
}
}