On 19.10.2021 06:41, Juergen Gross wrote:
> --- a/tools/hotplug/Linux/launch-xenstore.in
> +++ b/tools/hotplug/Linux/launch-xenstore.in
> @@ -60,7 +60,7 @@ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . 
> @CONFIG_DIR@/@CONFIG_LEAF
>               echo "No xenstored found"
>               exit 1
>       }
> -     [ -z "$XENSTORED_OOM_MEM_THRESHOLD" ] || XENSTORED_OOM_MEM_THRESHOLD=50
> +     [ -z "$XENSTORED_OOM_MEM_THRESHOLD" ] && XENSTORED_OOM_MEM_THRESHOLD=50

Is resilience against "set -e" being in effect of interest? If so I
think this would want to be

        [ -n "$XENSTORED_OOM_MEM_THRESHOLD" ] || XENSTORED_OOM_MEM_THRESHOLD=50

>       XS_OOM_SCORE=-$(($XENSTORED_OOM_MEM_THRESHOLD * 10))

Alternatively, how about dropping the line above and using

        XS_OOM_SCORE=-$((${XENSTORED_OOM_MEM_THRESHOLD:-50} * 10))

here?

Jan


Reply via email to