From 5d733131b6431dcfec4e606652cb525b8ef2a5ce Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Tue, 19 May 2020 09:59:43 +0200 Subject: [PATCH] pve-efiboot-tool: format: fix handling of disk/by-id The format command will fail when using other paths like /dev/disk/by-id/ instead of /dev/sdXY directly. It cannot find the path /sys/block///partition path. The part name in /dev/disk/by-id is a symlink to /dev/sdXY. At that point we already have the symlink resolved to the real path. It is stored in `bdev`. Signed-off-by: Aaron Lauterer --- bin/pve-efiboot-tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pve-efiboot-tool b/bin/pve-efiboot-tool index eab01d7..d54b443 100755 --- a/bin/pve-efiboot-tool +++ b/bin/pve-efiboot-tool @@ -96,7 +96,7 @@ format() { fi fi - part_basename=$(basename "$part") + part_basename=$(basename "$bdev") if [ -z "$part_basename" ]; then warn "E: unable to determine basename of '$part'" exit 1