kernel-install: add a check that the vmlinuz arg is sane

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-04-02 14:54:42 +02:00 committed by Lennart Poettering
parent f5a44d42af
commit 51be9a8c41
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,11 @@ case $COMMAND in
exit 1
fi
if [[ ! -f "$KERNEL_IMAGE" ]]; then
echo "Kernel image argument ${KERNEL_IMAGE} not a file" >&2
exit 1
fi
for f in "${PLUGINS[@]}"; do
if [[ -x $f ]]; then
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \