Skip to content

Commit

Permalink
Fixed bug where presence of LUKS keyfile was being checked for on disk,
Browse files Browse the repository at this point in the history
even though the user had elected (by setting LUKSKEYFILE variable to
the empty string) to use a fallback passphrase only.
Version bumped accordingly to 1.0.2.
  • Loading branch information
sakaki- committed Jul 25, 2014
1 parent 6748d9b commit 52946ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions buildkernel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ shopt -s nullglob
# ********************** variables *********************
PROGNAME="$(basename "${0}")"
CONFFILE="/etc/${PROGNAME}.conf"
VERSION="1.0.1"
VERSION="1.0.2"
DEFAULTEFIBOOTFILE="bootx64.efi"
EFIBOOTFILE="${DEFAULTEFIBOOTFILE}"
NEWVERSION="$(basename $(realpath "/usr/src/linux"))"
Expand Down Expand Up @@ -1267,16 +1267,18 @@ conform_efi_boot_order_if_possible() {
check_key_file_if_on_efi_system_partition () {
# We check for the presence of a key file ONLY if it is on the EFI system
# partition, as this must be mounted on entry to this function
if [[ "${KEYFILEPARTUUID}" == "${EFIPARTUUID}" ]]; then
# keyfile should be on our already-mounted partition
if [ ! -s "${EFIROOTDIR}/${LUKSKEYFILE}" ]; then
die "The ${EFIPARTNAME} does not contain a LUKS key file"
if [ -n "${LUKSKEYFILE}" ]; then
if [[ "${KEYFILEPARTUUID}" == "${EFIPARTUUID}" ]]; then
# keyfile should be on our already-mounted partition
if [ ! -s "${EFIROOTDIR}/${LUKSKEYFILE}" ]; then
die "The ${EFIPARTNAME} does not contain a LUKS key file"
fi
else
warning "Your keyfile partition is != the EFI system partition"
warning "Please ensure that ${LUKSKEYFILE} is present, on partition"
warning "${KEYFILEPARTUUID},"
warning "before attemping to reboot"
fi
else
warning "Your keyfile partition is != the EFI system partition"
warning "Please ensure that ${LUKSKEYFILE} is present, on partition"
warning "${KEYFILEPARTUUID},"
warning "before attemping to reboot"
fi
}
ensure_efi_partition_mounted() {
Expand Down
2 changes: 1 addition & 1 deletion buildkernel.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BUILDKERNEL 8 "Version 1.0.1: July 2014"
.TH BUILDKERNEL 8 "Version 1.0.2: July 2014"
.SH NAME
buildkernel \- build secure boot kernel, save to EFI system partition
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion buildkernel.conf.5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BUILDKERNEL 5 "Version 1.0.0: July 2014"
.TH BUILDKERNEL 5 "Version 1.0.2: July 2014"
.SH NAME
buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8)
.SH SYNOPSIS
Expand Down

0 comments on commit 52946ea

Please sign in to comment.