From cd42dbfb99d887d14cd77c9aa1ef0dae1bbe14e7 Mon Sep 17 00:00:00 2001 From: Oguz Bektas Date: Fri, 8 Nov 2019 13:47:22 +0100 Subject: [PATCH] use perl instead of (g)awk to clean /proc/cmdline this awk line only works with gawk because of implementation differences between awk alternatives. debian has mawk installed by default, and mawk does not implement word boundary regex. to avoid having to depend on gawk, we can just use perl instead. Signed-off-by: Oguz Bektas --- efiboot/zz-pve-efiboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/efiboot/zz-pve-efiboot b/efiboot/zz-pve-efiboot index 1985d65..afdd665 100755 --- a/efiboot/zz-pve-efiboot +++ b/efiboot/zz-pve-efiboot @@ -51,7 +51,7 @@ update_esps() { else warn "No /etc/kernel/cmdline found - falling back to /proc/cmdline" # remove initrd entries - CMDLINE="$(awk '{ gsub(/\yinitrd=([0-9a-zA-Z\/\\._-])*\s*/, ""); print $0 }' /proc/cmdline)" + CMDLINE="$(perl -pe 's/\binitrd=([0-9a-zA-Z\\\/.-])*\s*//g;' /proc/cmdline)" fi loop_esp_list update_esp_func