mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-24 19:21:03 -05:00
improve kernel and initrd file detection
This commit is contained in:
parent
8367b27a0d
commit
96d6ca7ae0
@ -10,6 +10,11 @@ set -e
|
|||||||
## Get the kernel command-line arguments
|
## Get the kernel command-line arguments
|
||||||
cmdline=$(cat /proc/cmdline)
|
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*')
|
boot_image_full=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*')
|
||||||
## example boot_image_full:
|
## example boot_image_full:
|
||||||
## BOOT_IMAGE=/vmlinuz-5.10.0-20-amd64
|
## BOOT_IMAGE=/vmlinuz-5.10.0-20-amd64
|
||||||
|
Loading…
Reference in New Issue
Block a user