mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-14 04:59:30 -05:00
refactoring
This commit is contained in:
parent
e81dd6cd25
commit
5b11eecaec
@ -14,13 +14,13 @@ 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 -r "$initrd"; then
|
if ! test -r "$kernel"; then
|
||||||
echo "$0: ERROR: Initrd File '$initrd' not found or not readable!"
|
echo "$0: ERROR: Kernel File '$kernel' not found or not readable!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! test -r "$kernel"; then
|
if ! test -r "$initrd"; then
|
||||||
echo "$0: ERROR: Kernel File '$kernel' not found or not readable!"
|
echo "$0: ERROR: Initrd File '$initrd' not found or not readable!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user