mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-04-28 18:31:23 +00:00
fix #2403: exclude initrd entries from /proc/cmdline
if we fallback to /proc/cmdline, it can include the booted initrd. to avoid loader entries with initrd 'options' lines, we have to parse them out. Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
parent
1533d98534
commit
86cdbeb5aa
@ -50,7 +50,8 @@ update_esps() {
|
||||
CMDLINE="$(cat /etc/kernel/cmdline)"
|
||||
else
|
||||
warn "No /etc/kernel/cmdline found - falling back to /proc/cmdline"
|
||||
CMDLINE="$(cat /proc/cmdline)"
|
||||
# remove initrd entries
|
||||
CMDLINE="$(awk '{gsub(/\yinitrd=([0-9a-zA-Z\/\\._-])*\s*/,x)}1' /proc/cmdline)"
|
||||
fi
|
||||
|
||||
loop_esp_list update_esp_func
|
||||
|
Loading…
Reference in New Issue
Block a user