]> git.proxmox.com Git - pve-kernel-meta.git/commitdiff
proxmox-boot-tool: sort and remove duplicates on clean
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 23 Apr 2021 09:04:45 +0000 (11:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Apr 2021 11:28:56 +0000 (13:28 +0200)
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.ivanov@proxmox.com>
bin/proxmox-boot-tool

index a60fc0c99b850ccc431b99495a4bc9abc0612f97..ceaf50eb9ac3905955c4b535c7470fdc41f3bd14 100755 (executable)
@@ -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() {