diff options
author | Xorg | 2022-01-31 19:45:30 +0100 |
---|---|---|
committer | Xorg | 2022-01-31 19:45:30 +0100 |
commit | 600ab3bcaead591e7f27e833789a27ab3c5d2803 (patch) | |
tree | 05762eaf8db5f78f0016ad401577240d3cb0f204 /memtest86-efi | |
parent | 96f97cd456aac44330d6d8a224caa88ace2360b1 (diff) | |
download | aur-600ab3bcaead591e7f27e833789a27ab3c5d2803.tar.gz |
Script: mount ESP if not mounted during update
https://aur.archlinux.org/packages/memtest86-efi/#comment-849565
Diffstat (limited to 'memtest86-efi')
-rw-r--r-- | memtest86-efi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/memtest86-efi b/memtest86-efi index 45a7fb7b4ac6..31233da3061a 100644 --- a/memtest86-efi +++ b/memtest86-efi @@ -211,6 +211,14 @@ update() { ;; 2|3|4) # Update files in $esp/EFI/memtest86/ + ## Check if efi partition is mounted, if not mount it + if ! mount | grep "$partition" | grep -q "$esp"; then + echo -e "ESP ${CB}$partition${CR} is not mounted, mounting..." + if ! mount "$partition" "$esp"; then + echo -e "${CE}Fail to mount $partition on $esp. Aborted.${CR}" > /dev/stderr + exit $CODE_FATAL + fi + fi _common_install "$esp/EFI/memtest86" "memtest$ARCH.efi" ;; esac |