]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: use exit instead of return (#4565)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Nov 2016 12:58:41 +0000 (21:58 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 4 Nov 2016 12:58:41 +0000 (08:58 -0400)
/bin/kernel-install: line 143: return: can only `return' from a function or sourced script

https://bugzilla.redhat.com/show_bug.cgi?id=1391829

src/kernel-install/kernel-install

index 0c0ee718accf552c204f51ca71c07529c399e235..a95b9717f022c82087d257b88960d11edab0076d 100644 (file)
@@ -127,7 +127,7 @@ case $COMMAND in
                 "$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE"
                 x=$?
                 if [[ $x == $SKIP_REMAINING ]]; then
-                    return 0
+                    exit 0
                 fi
                 ((ret+=$x))
             fi
@@ -140,7 +140,7 @@ case $COMMAND in
                 "$f" remove "$KERNEL_VERSION" "$BOOT_DIR_ABS"
                 x=$?
                 if [[ $x == $SKIP_REMAINING ]]; then
-                    return 0
+                    exit 0
                 fi
                 ((ret+=$x))
             fi