Blame 0011-base-dracut-lib.sh-relax-getargbool-value-parsing.patch

ecc2cf7
From d0128287a671f1a009b8062e3e9bfa877b36be8c Mon Sep 17 00:00:00 2001
6e34bd3
From: Harald Hoyer <harald@redhat.com>
6e34bd3
Date: Wed, 30 Mar 2011 01:45:17 +0200
6e34bd3
Subject: [PATCH] base/dracut-lib.sh: relax getargbool value parsing
6e34bd3
6e34bd3
if a non-boolean value was specified, like "yes" or "no",
6e34bd3
getargbool() would error, because we check for "$val -eq 0"
6e34bd3
---
6e34bd3
 modules.d/99base/dracut-lib.sh |    2 +-
142830f
 1 file changed, 1 insertion(+), 1 deletion(-)
6e34bd3
6e34bd3
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
6e34bd3
index a5406ab..37b3e76 100755
6e34bd3
--- a/modules.d/99base/dracut-lib.sh
6e34bd3
+++ b/modules.d/99base/dracut-lib.sh
6e34bd3
@@ -98,7 +98,7 @@ getargbool() {
6e34bd3
     _b=$(getarg "$@")
6e34bd3
     [ $? -ne 0 -a -z "$_b" ] && _b=$_default
6e34bd3
     if [ -n "$_b" ]; then
6e34bd3
-        [ $_b -eq 0 ] && return 1
6e34bd3
+        [ $_b = "0" ] && return 1
6e34bd3
         [ $_b = "no" ] && return 1
6e34bd3
     fi
6e34bd3
     return 0
142830f
-- 
142830f
1.7.9.3
142830f