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 <s.iva...@proxmox.com>
---
 bin/proxmox-boot-tool | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/proxmox-boot-tool b/bin/proxmox-boot-tool
index 7b06d57..df80c73 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() {
-- 
2.20.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to