diff --git a/buildkernel b/buildkernel index c5078e7..fc6ba3e 100755 --- a/buildkernel +++ b/buildkernel @@ -31,7 +31,7 @@ shopt -s nullglob # ********************** variables ********************* PROGNAME="$(basename "${0}")" CONFFILE="/etc/${PROGNAME}.conf" -VERSION="1.0.3" +VERSION="1.0.4" DEFAULTEFIBOOTFILE="bootx64.efi" EFIBOOTFILE="${DEFAULTEFIBOOTFILE}" NEWVERSION="$(basename $(realpath "/usr/src/linux"))" @@ -484,6 +484,10 @@ find_all_efi_boot_entries() { NEXTPATH="${NEXTPATH:5:-1}" local NEXTNAME="$(efibootmgr | grep "^${NEXTSIG}" | cut -c11-)" NEXTUUID="${NEXTUUID,,}" + if [[ -z "${NEXTID}" || -z "${NEXTNAME}" || -z "${NEXTPATH}" || -z "${NEXTUUID}" || -z "${NEXTISACTIVE}" ]]; then + # one of the required strings is empty, we cannot use this line + continue + fi # assign results (Bash treats arrays as unset if not assigned a value) EBOOTIDS=("${EBOOTIDS[@]:+${EBOOTIDS[@]}}" "${NEXTID}") EBOOTNAMES=("${EBOOTNAMES[@]:+${EBOOTNAMES[@]}}" "${NEXTNAME}") diff --git a/buildkernel.8 b/buildkernel.8 index 7c1536a..4ce4b5d 100644 --- a/buildkernel.8 +++ b/buildkernel.8 @@ -1,4 +1,4 @@ -.TH BUILDKERNEL 8 "Version 1.0.3: July 2014" +.TH BUILDKERNEL 8 "Version 1.0.4: August 2014" .SH NAME buildkernel \- build secure boot kernel, save to EFI system partition .SH SYNOPSIS diff --git a/buildkernel.conf.5 b/buildkernel.conf.5 index 7cf64be..aab1be3 100644 --- a/buildkernel.conf.5 +++ b/buildkernel.conf.5 @@ -1,4 +1,4 @@ -.TH BUILDKERNEL 5 "Version 1.0.3: July 2014" +.TH BUILDKERNEL 5 "Version 1.0.4: August 2014" .SH NAME buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8) .SH SYNOPSIS