diff --git a/buildkernel b/buildkernel index c5a89b5..a67157c 100755 --- a/buildkernel +++ b/buildkernel @@ -31,7 +31,7 @@ shopt -s nullglob # ********************** variables ********************* PROGNAME="$(basename "${0}")" CONFFILE="/etc/${PROGNAME}.conf" -VERSION="1.0.32" +VERSION="1.0.33" ETCPROFILE="/etc/profile" DEFAULTEFIBOOTFILE="bootx64.efi" EFIBOOTFILE="${DEFAULTEFIBOOTFILE}" @@ -174,6 +174,7 @@ declare -i EFIVARFSREMOUNTEDRW=0 declare -i USINGMODULES=1 declare -i MOUNTEDONENTRY=0 +declare -i DOUNMOUNT=1 # program arguments (booleans in this case) declare -i ARG_ASK=0 ARG_CLEAN=0 ARG_COPYFROMSTAGING=0 ARG_HELP=0 declare -i ARG_STAGEONLY=0 ARG_UNMOUNTATEND=0 ARG_VERBOSE=0 ARG_VERSION=0 @@ -356,8 +357,10 @@ umount_and_forget() { umount_all_remembered_mountpoints() { local M ALLREMEMBEREDMOUNTS="${!ALLMOUNTS[@]}" for M in ${ALLREMEMBEREDMOUNTS}; do - warning "Unmounting '${M}'" - umount_and_forget "${M}" + if (( DOUNMOUNT == 1 )) || [[ "${M}" != "${EFIROOTDIR}" ]]; then + warning "Unmounting '${M}'" + umount_and_forget "${M}" + fi done } ensure_efivarfs_rw_if_present() { @@ -2013,7 +2016,7 @@ finalize_efi_partition_and_unmount_if_desired() { show "Syncing filesystem..." sync echo - declare -i DOUNMOUNT=0 + DOUNMOUNT=0 if ((ARG_UNMOUNTATEND==1)); then # this trumps everything else diff --git a/buildkernel.8 b/buildkernel.8 index 8c61ee4..b638aec 100644 --- a/buildkernel.8 +++ b/buildkernel.8 @@ -1,4 +1,4 @@ -.TH BUILDKERNEL 8 "Version 1.0.32: October 2018" +.TH BUILDKERNEL 8 "Version 1.0.33: October 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 657fc97..b634371 100644 --- a/buildkernel.conf.5 +++ b/buildkernel.conf.5 @@ -1,4 +1,4 @@ -.TH BUILDKERNEL 5 "Version 1.0.32: October 2018" +.TH BUILDKERNEL 5 "Version 1.0.33: October 2018" .SH NAME buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8) .SH SYNOPSIS