+
+ vtinfo "esp partition processing ..."
+
+ sleep 1
+ mtpnt=$(grep "^${DISK}2" /proc/mounts | awk '{print $2}')
+ if [ -n "$mtpnt" ]; then
+ umount $mtpnt >/dev/null 2>&1
+ fi
+
+ if [ "$SECUREBOOT" != "YES" ]; then
+ mkdir ./tmp_mnt
+
+ vtdebug "mounting part2 ...."
+ for tt in 1 2 3; do
+ if mount ${DISK}2 ./tmp_mnt; then
+ vtdebug "mounting part2 success"
+ break
+ fi
+
+ mtpnt=$(grep "^${DISK}2" /proc/mounts | awk '{print $2}')
+ if [ -n "$mtpnt" ]; then
+ umount $mtpnt >/dev/null 2>&1
+ fi
+ sleep 2
+ done
+
+ rm -f ./tmp_mnt/EFI/BOOT/BOOTX64.EFI
+ rm -f ./tmp_mnt/EFI/BOOT/grubx64.efi
+ rm -f ./tmp_mnt/EFI/BOOT/MokManager.efi
+ rm -f ./tmp_mnt/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
+ mv ./tmp_mnt/EFI/BOOT/grubx64_real.efi ./tmp_mnt/EFI/BOOT/BOOTX64.EFI
+
+ umount ./tmp_mnt
+ rm -rf ./tmp_mnt
+ fi