Skip to content

Commit d15ae23

Browse files
committed
Respect request to not unmount EFI boot partition
(when running in interactive mode) Bump version to 1.0.33
1 parent c5af580 commit d15ae23

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

buildkernel

Lines changed: 7 additions & 4 deletions
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.32"
34+
VERSION="1.0.33"
3535
ETCPROFILE="/etc/profile"
3636
DEFAULTEFIBOOTFILE="bootx64.efi"
3737
EFIBOOTFILE="${DEFAULTEFIBOOTFILE}"
@@ -174,6 +174,7 @@ declare -i EFIVARFSREMOUNTEDRW=0
174174
declare -i USINGMODULES=1
175175

176176
declare -i MOUNTEDONENTRY=0
177+
declare -i DOUNMOUNT=1
177178
# program arguments (booleans in this case)
178179
declare -i ARG_ASK=0 ARG_CLEAN=0 ARG_COPYFROMSTAGING=0 ARG_HELP=0
179180
declare -i ARG_STAGEONLY=0 ARG_UNMOUNTATEND=0 ARG_VERBOSE=0 ARG_VERSION=0
@@ -356,8 +357,10 @@ umount_and_forget() {
356357
umount_all_remembered_mountpoints() {
357358
local M ALLREMEMBEREDMOUNTS="${!ALLMOUNTS[@]}"
358359
for M in ${ALLREMEMBEREDMOUNTS}; do
359-
warning "Unmounting '${M}'"
360-
umount_and_forget "${M}"
360+
if (( DOUNMOUNT == 1 )) || [[ "${M}" != "${EFIROOTDIR}" ]]; then
361+
warning "Unmounting '${M}'"
362+
umount_and_forget "${M}"
363+
fi
361364
done
362365
}
363366
ensure_efivarfs_rw_if_present() {
@@ -2013,7 +2016,7 @@ finalize_efi_partition_and_unmount_if_desired() {
20132016
show "Syncing filesystem..."
20142017
sync
20152018
echo
2016-
declare -i DOUNMOUNT=0
2019+
DOUNMOUNT=0
20172020

20182021
if ((ARG_UNMOUNTATEND==1)); then
20192022
# this trumps everything else

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.32: October 2018"
1+
.TH BUILDKERNEL 8 "Version 1.0.33: 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.32: October 2018"
1+
.TH BUILDKERNEL 5 "Version 1.0.33: October 2018"
22
.SH NAME
33
buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8)
44
.SH SYNOPSIS

0 commit comments

Comments
 (0)