chiark / gitweb /
kernel-install: don't make unused parameter mandatory
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>
Tue, 26 Mar 2013 17:11:31 +0000 (18:11 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 8 Apr 2013 15:00:04 +0000 (17:00 +0200)
We only use the image name in the case we're adding a kernel

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
src/kernel-install/kernel-install

index 16c06e0..9f3a523 100644 (file)
@@ -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