From: Marc-Antoine Perennou Date: Tue, 26 Mar 2013 17:11:31 +0000 (+0100) Subject: kernel-install: don't make unused parameter mandatory X-Git-Tag: v201~14 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d82d87dac1233ddd109437844321645be5bcd4cb;p=elogind.git kernel-install: don't make unused parameter mandatory We only use the image name in the case we're adding a kernel Signed-off-by: Marc-Antoine Perennou --- diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install index 16c06e084..9f3a52321 100644 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -62,7 +62,7 @@ usage() } >&2 } -if ! ( [[ $COMMAND ]] && [[ $KERNEL_VERSION ]] && [[ $KERNEL_IMAGE ]] ); then +if ! ( [[ $COMMAND ]] && [[ $KERNEL_VERSION ]] ); then usage exit 1 fi @@ -101,6 +101,10 @@ readarray -t PLUGINS < <( case "$COMMAND" in add) + if [[ -z $KERNEL_IMAGE ]]; then + usage + exit 1 + fi mkdir -p "$BOOT_DIR_ABS" || exit 1 for f in "${PLUGINS[@]}"; do