mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-04-28 16:36:48 +00:00
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 <o.bektas@proxmox.com>
This commit is contained in:
parent
25c1475040
commit
cd42dbfb99
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user