X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Fscript-functions;h=a39e3d8a34ce783493e6e836f6baf09d46893fb0;hb=69d4655e7691826d627510926aa919ddeb1f5fa0;hp=1786072d771c8c634af233be48314801582f5b40;hpb=ebd1c1c5d48b3a12ec039783a2f865c251cf76c6;p=grml-etc-core.git diff --git a/etc/grml/script-functions b/etc/grml/script-functions index 1786072..a39e3d8 100644 --- a/etc/grml/script-functions +++ b/etc/grml/script-functions @@ -76,8 +76,9 @@ stringinstring(){ # {{{ reread boot command line; echo last parameter's argument or return false. getbootparam(){ - stringinstring " $1=" /proc/cmdline || return 1 - result="${/proc/cmdline##*$1=}" + CMDLINE=$(cat /proc/cmdline) + stringinstring " $1=" "$CMDLINE" || return 1 + result="${CMDLINE##*$1=}" result="${result%%[ ]*}" echo "$result" return 0 @@ -86,7 +87,7 @@ getbootparam(){ # {{{ check boot commandline for specified option checkbootparam(){ - stringinstring " $1" /proc/cmdline + stringinfile " $1" /proc/cmdline return "$?" } # }}}