@@ -31,7 +31,7 @@ shopt -s nullglob
3131# ********************** variables *********************
3232PROGNAME=" $( basename " ${0} " ) "
3333CONFFILE=" /etc/${PROGNAME} .conf"
34- VERSION=" 1.0.32 "
34+ VERSION=" 1.0.33 "
3535ETCPROFILE=" /etc/profile"
3636DEFAULTEFIBOOTFILE=" bootx64.efi"
3737EFIBOOTFILE=" ${DEFAULTEFIBOOTFILE} "
@@ -174,6 +174,7 @@ declare -i EFIVARFSREMOUNTEDRW=0
174174declare -i USINGMODULES=1
175175
176176declare -i MOUNTEDONENTRY=0
177+ declare -i DOUNMOUNT=1
177178# program arguments (booleans in this case)
178179declare -i ARG_ASK=0 ARG_CLEAN=0 ARG_COPYFROMSTAGING=0 ARG_HELP=0
179180declare -i ARG_STAGEONLY=0 ARG_UNMOUNTATEND=0 ARG_VERBOSE=0 ARG_VERSION=0
@@ -356,8 +357,10 @@ umount_and_forget() {
356357umount_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}
363366ensure_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
0 commit comments