diff --git a/buildkernel b/buildkernel index 738b248..1b26544 100755 --- a/buildkernel +++ b/buildkernel @@ -31,7 +31,7 @@ shopt -s nullglob # ********************** variables ********************* PROGNAME="$(basename "${0}")" CONFFILE="/etc/${PROGNAME}.conf" -VERSION="1.0.28" +VERSION="1.0.29" ETCPROFILE="/etc/profile" DEFAULTEFIBOOTFILE="bootx64.efi" EFIBOOTFILE="${DEFAULTEFIBOOTFILE}" @@ -57,8 +57,15 @@ LUKSKEYFILE="${DEFAULTLUKSKEYFILE}" MODPROBEDIR="/etc/modprobe.d" CMDLINE_ROOT="/dev/ram0" SYSTEMD_INIT="/usr/lib/systemd/systemd" +SYSTEMD_NEW_INIT="/lib/systemd/systemd" OPENRC_INIT="/sbin/init" -CMDLINE_REAL_INIT="${SYSTEMD_INIT}" +if [[ -e "${SYSTEMD_NEW_INIT}" ]]; then + # new path exists, so use it + CMDLINE_REAL_INIT="${SYSTEMD_NEW_INIT}" +else + # fallback for older systems + CMDLINE_REAL_INIT="${SYSTEMD_INIT}" +fi CMDLINE_DOLVM_FLAG="dolvm" SECUREBOOTKEY="/etc/efikeys/db.key" SECUREBOOTCERT="/etc/efikeys/db.crt" diff --git a/buildkernel.8 b/buildkernel.8 index ec5eb0f..0fd8a36 100644 --- a/buildkernel.8 +++ b/buildkernel.8 @@ -1,4 +1,4 @@ -.TH BUILDKERNEL 8 "Version 1.0.28: November 2017" +.TH BUILDKERNEL 8 "Version 1.0.29: January 2018" .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 9e28261..be37f09 100644 --- a/buildkernel.conf.5 +++ b/buildkernel.conf.5 @@ -1,4 +1,4 @@ -.TH BUILDKERNEL 5 "Version 1.0.28: November 2017" +.TH BUILDKERNEL 5 "Version 1.0.29: January 2018" .SH NAME buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8) .SH SYNOPSIS