[systemd-devel] [PATCH] kernel-install: don't make unused parameter mandatory

Marc-Antoine Perennou Marc-Antoine at Perennou.com
Tue Mar 26 10:11:31 PDT 2013


We only use the image name in the case we're adding a kernel

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine at Perennou.com>
---
 src/kernel-install/kernel-install | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index 16c06e0..9f3a523 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
-- 
1.8.1.5



More information about the systemd-devel mailing list