refactoring

This commit is contained in:
Patrick Schleizer 2023-01-08 06:45:10 -05:00
parent e81dd6cd25
commit 5b11eecaec
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -14,13 +14,13 @@ 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 -r "$initrd"; then
echo "$0: ERROR: Initrd File '$initrd' not found or not readable!"
if ! test -r "$kernel"; then
echo "$0: ERROR: Kernel File '$kernel' not found or not readable!"
exit 1
fi
if ! test -r "$kernel"; then
echo "$0: ERROR: Kernel File '$kernel' not found or not readable!"
if ! test -r "$initrd"; then
echo "$0: ERROR: Initrd File '$initrd' not found or not readable!"
exit 1
fi