From 33f32d0a30ff6cbada7b99770c563f0c8ee7599b Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Fri, 23 Apr 2021 11:04:45 +0200 Subject: [PATCH] proxmox-boot-tool: sort and remove duplicates on clean This is mostly in preparation for renaming pve-efiboot-uuids into proxmox-boot-uuids, but can help in general (since each duplicate uuid causes excessive disk i/o upon kernel upgrades). Signed-off-by: Stoiko Ivanov --- bin/proxmox-boot-tool | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/proxmox-boot-tool b/bin/proxmox-boot-tool index a60fc0c..ceaf50e 100755 --- a/bin/proxmox-boot-tool +++ b/bin/proxmox-boot-tool @@ -195,6 +195,10 @@ clean() { if [ -e "$ESP_LIST".tmp ]; then mv "$ESP_LIST".tmp "$ESP_LIST" fi + + echo "Sorting and removing duplicate ESPs.." + sort -uo "$ESP_LIST".tmp "$ESP_LIST" + mv "$ESP_LIST".tmp "$ESP_LIST" } refresh() {