PR #195 added `:?` checks to ensure that required variables are set, but
the checks also apply to KERNEL_IMAGE, which isn't present when running
`kernel-install remove <version>`. This commit removes the check from
that variable, similar to what systemd's `90-loadentry.install` does.
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
KERNEL_VERSION="${2:?}"
#shellcheck disable=SC2034
BOOT_DIR_ABS="$3"
-KERNEL_IMAGE="${4:?}"
+KERNEL_IMAGE="$4"
# If the initrd was provided on the kernel command line, we shouldn't generate our own.
if [[ "$COMMAND" != "add" || "$#" -gt 4 ]]; then
COMMAND="${1:?}"
KERNEL_VERSION="${2:?}"
BOOT_DIR_ABS="${3%/*}/0-rescue"
-KERNEL_IMAGE="${4:?}"
+KERNEL_IMAGE="$4"
# If the initrd was provided on the kernel command line, we shouldn't generate our own.
if [[ "$COMMAND" = "add" && "$#" -gt 4 ]]; then