mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-20 07:24:11 -04:00
test if readable
This commit is contained in:
parent
227871c12c
commit
c3a822af0e
1 changed files with 4 additions and 4 deletions
|
@ -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 -e "$initrd"; then
|
if ! test -r "$initrd"; then
|
||||||
echo "$0: ERROR: Initrd File '$initrd' NOT FOUND!"
|
echo "$0: ERROR: Initrd File '$initrd' not found or not readable!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! test -e "$kernel"; then
|
if ! test -r "$kernel"; then
|
||||||
echo "$0: ERROR: Kernel File '$kernel' NOT FOUND!"
|
echo "$0: ERROR: Kernel File '$kernel' not found or not readable!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue