mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-19 18:44:11 -04:00
improve kernel and initrd file detection
This commit is contained in:
parent
8367b27a0d
commit
96d6ca7ae0
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue