improve kernel and initrd file detection

This commit is contained in:
Patrick Schleizer 2023-01-08 07:09:09 -05:00
parent 8367b27a0d
commit 96d6ca7ae0
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -10,6 +10,11 @@ set -e
## Get the kernel command-line arguments
cmdline=$(cat /proc/cmdline)
if [ "$cmdline" = "" ]; then
echo "$0: ERROR: /proc/cmdline is empty!"
exit 1
fi
boot_image_full=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*')
## example boot_image_full:
## BOOT_IMAGE=/vmlinuz-5.10.0-20-amd64