mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-23 01:23:36 +07: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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user