mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-07-13 01:09:16 +07:00
code simplification
This commit is contained in:
@ -14,16 +14,12 @@ cmdline=$(cat /proc/cmdline)
|
|||||||
kernel=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*' | cut -d '=' -f 2)
|
kernel=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*' | cut -d '=' -f 2)
|
||||||
initrd=$(echo "$kernel" | sed "s#vmlinuz#initrd.img#")
|
initrd=$(echo "$kernel" | sed "s#vmlinuz#initrd.img#")
|
||||||
|
|
||||||
if test -e "$initrd"; then
|
if ! test -e "$initrd"; then
|
||||||
echo "$0: INFO: Initrd File Found"
|
|
||||||
else
|
|
||||||
echo "$0: ERROR: Initrd File NOT FOUND"
|
echo "$0: ERROR: Initrd File NOT FOUND"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -e "$kernel"; then
|
if ! test -e "$kernel"; then
|
||||||
echo "$0: INFO: Kernel File Found"
|
|
||||||
else
|
|
||||||
echo "$0: ERROR: Kernel File NOT FOUND"
|
echo "$0: ERROR: Kernel File NOT FOUND"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user