[FreeNX-kNX] nxserver low performance when querying sessions (patch included)

Boris Savelev boris.savelev at gmail.com
Wed Jul 29 15:22:29 UTC 2009


> @@ -26,9 +26,9 @@
>
>  # Reread boot command line; echo last parameter's argument or return false.
>  getparam(){
> -stringinstring "&$1=" "$CMDLINE" || return 1
> -echo "$CMDLINE" |  tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }'
> -return 0
> +    [[ "&$CMDLINE" =~ ".*&$1=([^&]*)" ]]
> +    echo ${BASH_REMATCH[1]}
> +    [ "$BASH_REMATCH" != "" ]
>  }

it doesnt works for me

but
<cut>
getparam(){
pattern=".*&$1=([^&]*)"
[[ $CMDLINE =~ $pattern ]]
[ "${BASH_REMATCH[1]}" != "" ] && echo "${BASH_REMATCH[1]}"
[ "$BASH_REMATCH" != "" ]
}
<cut>
works fine

-- 
Boris



More information about the FreeNX-kNX mailing list