projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e620bb0
)
base/dracut-lib.sh: relax getargbool value parsing
author
Harald Hoyer
<harald@redhat.com>
Tue, 29 Mar 2011 23:45:17 +0000
(
01:45
+0200)
committer
Harald Hoyer
<harald@redhat.com>
Tue, 29 Mar 2011 23:45:17 +0000
(
01:45
+0200)
if a non-boolean value was specified, like "yes" or "no",
getargbool() would error, because we check for "$val -eq 0"
modules.d/99base/dracut-lib.sh
patch
|
blob
|
history
diff --git
a/modules.d/99base/dracut-lib.sh
b/modules.d/99base/dracut-lib.sh
index
a5406ab
..
37b3e76
100755
(executable)
--- a/
modules.d/99base/dracut-lib.sh
+++ b/
modules.d/99base/dracut-lib.sh
@@
-98,7
+98,7
@@
getargbool() {
_b=$(getarg "$@")
[ $? -ne 0 -a -z "$_b" ] && _b=$_default
if [ -n "$_b" ]; then
- [ $_b
-eq 0
] && return 1
+ [ $_b
= "0"
] && return 1
[ $_b = "no" ] && return 1
fi
return 0