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 16c06e08421da98de928095d4db4e7b743ce165d..9f3a5232181de5ef1dd0fc737d5513e3c6b313c5 100644 (file)
@@ -62,7 +62,7 @@ usage()
     } >&2
 }
 
     } >&2
 }
 
-if ! ( [[ $COMMAND ]] && [[ $KERNEL_VERSION ]] && [[ $KERNEL_IMAGE ]] ); then
+if ! ( [[ $COMMAND ]] && [[ $KERNEL_VERSION ]] ); then
     usage
     exit 1
 fi
     usage
     exit 1
 fi
@@ -101,6 +101,10 @@ readarray -t PLUGINS < <(
 
 case "$COMMAND" in
     add)
 
 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
         mkdir -p "$BOOT_DIR_ABS" || exit 1
 
         for f in "${PLUGINS[@]}"; do