mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-05-02 15:46:06 -04:00
code simplification
This commit is contained in:
parent
01fee8a7b4
commit
c09f4da192
1 changed files with 2 additions and 6 deletions
|
@ -14,16 +14,12 @@ cmdline=$(cat /proc/cmdline)
|
|||
kernel=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*' | cut -d '=' -f 2)
|
||||
initrd=$(echo "$kernel" | sed "s#vmlinuz#initrd.img#")
|
||||
|
||||
if test -e "$initrd"; then
|
||||
echo "$0: INFO: Initrd File Found"
|
||||
else
|
||||
if ! test -e "$initrd"; then
|
||||
echo "$0: ERROR: Initrd File NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -e "$kernel"; then
|
||||
echo "$0: INFO: Kernel File Found"
|
||||
else
|
||||
if ! test -e "$kernel"; then
|
||||
echo "$0: ERROR: Kernel File NOT FOUND"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue