From edb4e115ce8207a3928543ecec77e92812facc1c Mon Sep 17 00:00:00 2001 From: Kristian Amlie Date: Tue, 15 Mar 2022 08:56:44 +0100 Subject: [PATCH] Do not remove the boot directory, if it happens to end up empty. Changelog: None Signed-off-by: Kristian Amlie --- modules/grub.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/grub.sh b/modules/grub.sh index a19b659..904f96f 100644 --- a/modules/grub.sh +++ b/modules/grub.sh @@ -173,7 +173,7 @@ function grub_install_mender_grub() { sudo rm -rf work/boot/EFI/systemd sudo rm -rf work/boot/NvVars for empty_dir in $( - cd work/boot && find . -maxdepth 1 -type d -empty + cd work/boot && find . -maxdepth 1 -type d -empty -not -name . ); do sudo rmdir work/boot/$empty_dir done