makes using this helper shorter in most cases

Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com>
---
 proxmox-boot/functions | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxmox-boot/functions b/proxmox-boot/functions
index 4515a2d..27da363 100755
--- a/proxmox-boot/functions
+++ b/proxmox-boot/functions
@@ -104,6 +104,11 @@ loop_esp_list() {
 
 get_first_line() {
        file="$1"
+       if [ ! -e  "$file" ]; then
+           echo ""
+           return
+       fi
+
        while IFS= read -r line || [ -n "$line" ]; do
                break
        done < "${file}"
-- 
2.30.2



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

Reply via email to