projects
/
grml-autoconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
362b637
)
Fix a bug in getbootparam()
author
Frank Terbeck
<ft@bewatermyfriend.org>
Wed, 9 Sep 2009 18:42:08 +0000
(20:42 +0200)
committer
Frank Terbeck
<ft@bewatermyfriend.org>
Wed, 9 Sep 2009 18:42:08 +0000
(20:42 +0200)
Reported-by: Ulrich Dangel <mru@grml.org>
autoconfig.functions
patch
|
blob
|
history
diff --git
a/autoconfig.functions
b/autoconfig.functions
index
50fdf81
..
b0a6d9b
100755
(executable)
--- a/
autoconfig.functions
+++ b/
autoconfig.functions
@@
-47,10
+47,14
@@
fi
# Get a bootoption's parameter: read boot command line and either
# echo last parameter's argument or return false.
getbootparam(){
- case "$CMDLINE" in
- *$1=*)
- result="${CMDLINE##* $1=}"
- result="${result%%[ ]*}"
+ local line
+ local ws
+ ws=' '
+ line=" $CMDLINE "
+ case "$line" in
+ *[${ws}]"$1="*)
+ result="${line##*[$ws]$1=}"
+ result="${result%%[$ws]*}"
echo "$result"
return 0 ;;
*) # no match?