summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
362b637)
Reported-by: Ulrich Dangel <mru@grml.org>
# Get a bootoption's parameter: read boot command line and either
# echo last parameter's argument or return false.
getbootparam(){
# 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?
echo "$result"
return 0 ;;
*) # no match?