[pve-devel] [PATCH kernel-meta 11/13] efiboot: always exit cleanly
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Jul 10 17:05:09 CEST 2019
otherwise the whole apt process stops.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
efiboot/zz-pve-efiboot | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/efiboot/zz-pve-efiboot b/efiboot/zz-pve-efiboot
index 5e4d6dc..06a1926 100755
--- a/efiboot/zz-pve-efiboot
+++ b/efiboot/zz-pve-efiboot
@@ -20,7 +20,8 @@ cleanup() {
for mount in "${MOUNTROOT}"/* ; do
if echo "${mount}" | grep -qE '[0-9a-fA-F]{4}-[0-9a-fA-F]{4}' && \
mountpoint -q "${mount}"; then
- umount "${mount}"
+ umount "${mount}" || \
+ { warn "umount of ${mount} failed - failure"; exit 0; }
fi
done
@@ -62,7 +63,8 @@ update_esps() {
fi
mountpoint="${MOUNTROOT}/${uuid}"
- mkdir -p "${mountpoint}"
+ mkdir -p "${mountpoint}" || \
+ { warn "creation of mountpoint ${mountpoint} failed - skipping"; continue; }
mount "${path}" "${mountpoint}" || \
{ warn "mount of ${path} failed - skipping"; continue; }
if [ ! -f "${mountpoint}/$PMX_LOADER_CONF" ]; then
@@ -79,9 +81,9 @@ update_esps() {
remove_old_kernels "${mountpoint}"
umount "${mountpoint}" || \
- { warn "umount of ${path} failed - failure"; exit 2; }
+ { warn "umount of ${path} failed - failure"; exit 0; }
- rmdir "${mountpoint}"
+ rmdir "${mountpoint}" || true
done
}
--
2.20.1
More information about the pve-devel
mailing list