diff options
author | Nowa Ammerlaan <nowa@gentoo.org> | 2024-12-29 20:13:36 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2025-01-02 18:08:29 +0100 |
commit | a9b25945f57ea44213913ed4796582435d011b1a (patch) | |
tree | af37f22b9f73aebd225b9881eea2c31eab83866d /eclass | |
parent | profiles: unmask generic-uki only on systemd 23.0 profiles (diff) | |
download | gentoo-a9b25945f57ea44213913ed4796582435d011b1a.tar.gz gentoo-a9b25945f57ea44213913ed4796582435d011b1a.tar.bz2 gentoo-a9b25945f57ea44213913ed4796582435d011b1a.zip |
mount-boot-utils.eclass: document user variables for skipping mount check
And introduce a new variable DONT_MOUNT_ESP to disable only the mount
checking of the EFI System Partition. Useful for ebuilds where we know that
only /boot is touched and not /efi. Or for users that know their kernel
installation layout does not require mounting the ESP.
Bug: https://bugs.gentoo.org/937785
Bug: https://bugs.gentoo.org/939760
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/mount-boot-utils.eclass | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/eclass/mount-boot-utils.eclass b/eclass/mount-boot-utils.eclass index e24b4e0c0826..72b4c9ccd14a 100644 --- a/eclass/mount-boot-utils.eclass +++ b/eclass/mount-boot-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: mount-boot-utils.eclass @@ -16,6 +16,18 @@ # This eclass provides the functions used by mount-boot.eclass in an "inherit- # safe" way. This allows these functions to be used in other eclasses cleanly. +# @ECLASS_VARIABLE: DONT_MOUNT_BOOT +# @USER_VARIABLE +# @DESCRIPTION: +# May be set by the user or an ebuild to completely disable mount checking +# of the /boot partition and the EFI System Partition. + +# @ECLASS_VARIABLE: DONT_MOUNT_ESP +# @USER_VARIABLE +# @DESCRIPTION: +# May be set by the user or an ebuild to disable mount checking of the +# EFI System Partition only. + case ${EAPI} in 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; @@ -62,7 +74,7 @@ mount-boot_check_status() { local candidates=( /boot ) # If system is booted with UEFI, check for ESP as well - if [[ -d /sys/firmware/efi ]]; then + if [[ -d /sys/firmware/efi && -z ${DONT_MOUNT_ESP} ]]; then # Use same candidates for ESP as installkernel and eclean-kernel candidates+=( /efi /boot/efi /boot/EFI ) fi |