]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): correct --help and --version exit codes
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Thu, 19 Jan 2023 11:08:39 +0000 (12:08 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 27 Jan 2023 08:02:57 +0000 (08:02 +0000)
Both are valid options that cause regular program termination without errors, so
dracut should return 0.

dracut.sh

index 901ed09e94356497240f5a0d342bce5f6149252c..77a30a62835eb8fdb6decfeb6090cedc5a1bc3d5 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -801,7 +801,7 @@ while :; do
         --fstab) use_fstab_l="yes" ;;
         -h | --help)
             long_usage
-            exit 1
+            exit 0
             ;;
         --bzip2) compress_l="bzip2" ;;
         --lzma) compress_l="lzma" ;;
@@ -845,7 +845,7 @@ while :; do
             ;;
         --version)
             long_version
-            exit 1
+            exit 0
             ;;
         --)
             shift