]> git.proxmox.com Git - pve-kernel-meta.git/commit
proxmox-boot: read only first line of /etc/kernel/cmdline
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 10 Nov 2021 15:25:10 +0000 (16:25 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 10:18:42 +0000 (11:18 +0100)
commit86c7015086e17aa4e51f27bbc6539e7c28481955
tree694b74f556ebc42acce4251b92ebd0c226f825e6
parentc473995e653b50b695cea6bb0921a78bcd0c5356
proxmox-boot: read only first line of /etc/kernel/cmdline

following the commit of removing the wrong indentation of the linux
and initrd lines - this commit strips empty lines (and leading
trailing whitespace) in /etc/kernel/cmdline.

I managed to reproduce the issue reported in the forum [0] by adding
empty lines to /etc/kernel/cmdline) - without this - systemd-boot
booted quite happily even with the indentation.

considered using perl -pe with multiline matching but thanks to
Thomas' suggestion went with the shell-builtin read.

the check for existance of 'root=' in the resulting CMDLINE was added,
since my test-system had an empty line in the beginning, which again
rendered it unbootable.

quickly tested on a VM.

[0]: https://forum.proxmox.com/threads/problem-with-proxmox-boot-tool.99043/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
proxmox-boot/zz-proxmox-boot