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