summaryrefslogtreecommitdiff
path: root/parabolaiso/mkparabolaiso
diff options
context:
space:
mode:
Diffstat (limited to 'parabolaiso/mkparabolaiso')
-rwxr-xr-xparabolaiso/mkparabolaiso58
1 files changed, 17 insertions, 41 deletions
diff --git a/parabolaiso/mkparabolaiso b/parabolaiso/mkparabolaiso
index 5405492..9d0a17d 100755
--- a/parabolaiso/mkparabolaiso
+++ b/parabolaiso/mkparabolaiso
@@ -733,7 +733,7 @@ _validate_requirements_bootmode_bios.syslinux.eltorito() {
_validate_requirements_bootmode_bios.syslinux.mbr
}
-_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
+_validate_common_requirements_bootmode_uefi-x64() {
# Check if we are building an x64 system
if [[ ! "${arch}" == "dual" ]] && [[ ! "${arch}" == "x86_64" ]]; then
(( validation_error=validation_error+1 ))
@@ -751,6 +751,21 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
_msg_error "Validating '${bootmode}': mmd and/or mcopy are not available on this host. Install 'mtools'!" 0
fi
+ # Check for optional packages
+ if [[ "${arch}" == "dual" ]]; then
+ # shellcheck disable=SC2154
+ if [[ ! " ${pkg_list_x86_64[*]} " =~ ' edk2-shell ' ]]; then
+ _msg_info "'edk2-shell' is not in the x86_64 package list. The ISO will not contain a bootable UEFI shell."
+ fi
+ elif [[ "${arch}" == "x86_64" ]]; then
+ if [[ ! " ${pkg_list[*]} " =~ ' edk2-shell ' ]]; then
+ _msg_info "'edk2-shell' is not in the package list. The ISO will not contain a bootable UEFI shell."
+ fi
+ fi
+}
+
+_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
+ _validate_common_requirements_bootmode_uefi-x64
# Check if systemd-boot configuration files exist
if [[ ! -d "${profile}/efiboot/loader/entries" ]]; then
(( validation_error=validation_error+1 ))
@@ -770,38 +785,10 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
fi
done
fi
-
- # Check for optional packages
- if [[ "${arch}" == "dual" ]]; then
- # shellcheck disable=SC2154
- if [[ ! " ${pkg_list_x86_64[*]} " =~ ' edk2-shell ' ]]; then
- _msg_info "'edk2-shell' is not in the x86_64 package list. The ISO will not contain a bootable UEFI shell."
- fi
- elif [[ "${arch}" == "x86_64" ]]; then
- if [[ ! " ${pkg_list[*]} " =~ ' edk2-shell ' ]]; then
- _msg_info "'edk2-shell' is not in the package list. The ISO will not contain a bootable UEFI shell."
- fi
- fi
}
_validate_requirements_bootmode_uefi-x64.refind.esp() {
- # Check if we are building an x64 system
- if [[ ! "${arch}" == "dual" ]] && [[ ! "${arch}" == "x86_64" ]]; then
- (( validation_error=validation_error+1 ))
- _msg_error "Validating '${bootmode}': This bootmode is available for 'dual' and 'x86_64' architectures only!" 0
- fi
-
- # Check if mkfs.fat is available
- if ! command -v mkfs.fat &> /dev/null; then
- (( validation_error=validation_error+1 ))
- _msg_error "Validating '${bootmode}': mkfs.fat is not available on this host. Install 'dosfstools'!" 0
- fi
-
- # Check if mmd and mcopy are available
- if ! { command -v mmd &> /dev/null && command -v mcopy &> /dev/null; }; then
- _msg_error "Validating '${bootmode}': mmd and/or mcopy are not available on this host. Install 'mtools'!" 0
- fi
-
+ _validate_common_requirements_bootmode_uefi-x64
# Check if rEFInd configuration files exist
if [[ ! -d "${profile}/efiboot/EFI/BOOT/entries" ]]; then
(( validation_error=validation_error+1 ))
@@ -821,17 +808,6 @@ _validate_requirements_bootmode_uefi-x64.refind.esp() {
fi
done
fi
-
- # Check for optional packages
- if [[ "${arch}" == "dual" ]]; then
- if [[ ! " ${pkg_list_x86_64[*]} " =~ ' edk2-shell ' ]]; then
- _msg_info "'edk2-shell' is not in the x86_64 package list. The ISO will not contain a bootable UEFI shell."
- fi
- elif [[ "${arch}" == "x86_64" ]]; then
- if [[ ! " ${pkg_list[*]} " =~ ' edk2-shell ' ]]; then
- _msg_info "'edk2-shell' is not in the package list. The ISO will not contain a bootable UEFI shell."
- fi
- fi
}
_validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {