commit:     7aa2e795e8bfb6fecb7e659617c98c5e7db845a5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 18 15:30:17 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 15:30:17 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=7aa2e795

gen_funcs.sh: restore_boot_mount_state(): Delete .bootdir.no_boot_partition 
only when present

Fixes 8458d98a ("Rework --mountboot handling")
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_funcs.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gen_funcs.sh b/gen_funcs.sh
index c453962..31e4a6c 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -1410,14 +1410,14 @@ restore_boot_mount_state() {
                if [ -f "${TEMP}/.bootdir.no_boot_partition" ]
                then
                        msg="mount: >> '${BOOTDIR}' is not a mountpoint; 
Nothing to restore ..."
+
+                       rm "${TEMP}/.bootdir.no_boot_partition" \
+                               || gen_die "Failed to remove bootdir state file 
'${TEMP}/.bootdir.no_boot_partition'!"
                fi
 
                print_info 5 '' 1 0
                print_info 5 "${msg}"
 
-               rm "${TEMP}/.bootdir.no_boot_partition" \
-                       || gen_die "Failed to remove bootdir state file 
'${TEMP}/.bootdir.no_boot_partition'!"
-
                return
        fi
 }

Reply via email to