Skip to content

Commit c5af580

Browse files
committed
Prevent multi-line inferred CMDLINE_ROOTFSTYPE (closes #21)
With btrfs, findmnt can output multiple entries (one per line). (Which in turn will then break KERNEL_CMD_LINE.) Thanks to leezu for reporting.
1 parent ede8b9f commit c5af580

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

buildkernel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ shopt -s nullglob
3131
# ********************** variables *********************
3232
PROGNAME="$(basename "${0}")"
3333
CONFFILE="/etc/${PROGNAME}.conf"
34-
VERSION="1.0.31"
34+
VERSION="1.0.32"
3535
ETCPROFILE="/etc/profile"
3636
DEFAULTEFIBOOTFILE="bootx64.efi"
3737
EFIBOOTFILE="${DEFAULTEFIBOOTFILE}"
@@ -481,6 +481,7 @@ setup_final_variables() {
481481
# falling back to ext4 if the findmnt-based lookup fails
482482
if [[ ! -v CMDLINE_ROOTFSTYPE ]]; then
483483
CMDLINE_ROOTFSTYPE="$(/bin/findmnt -n -o FSTYPE -S ${CMDLINE_REAL_ROOT} 2>/dev/null || echo ext4)"
484+
CMDLINE_ROOTFSTYPE="$(head -n 1 <<<"${CMDLINE_ROOTFSTYPE}")"
484485
fi
485486
# we use path syntax rather than "=PARTUUID=" syntax, as more reliable
486487
KERNEL_CMD_LINE="root=${CMDLINE_ROOT} crypt_root=${CRYPTPATHMAP} dolvm "

buildkernel.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH BUILDKERNEL 8 "Version 1.0.31: October 2018"
1+
.TH BUILDKERNEL 8 "Version 1.0.32: October 2018"
22
.SH NAME
33
buildkernel \- build secure boot kernel, save to EFI system partition
44
.SH SYNOPSIS

buildkernel.conf.5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH BUILDKERNEL 5 "Version 1.0.31: October 2018"
1+
.TH BUILDKERNEL 5 "Version 1.0.32: October 2018"
22
.SH NAME
33
buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8)
44
.SH SYNOPSIS

0 commit comments

Comments
 (0)