From: Felix Abecassis Date: Thu, 29 Mar 2018 17:20:31 +0000 (-0700) Subject: lxc-oci: fix Cmd/Entrypoint parsing X-Git-Tag: lxc-3.1.0~343^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d99e3b2ea72f99c8d8809cb6d774d1cdcc6e8dda;p=thirdparty%2Flxc.git lxc-oci: fix Cmd/Entrypoint parsing Don't use the -r option of jq, since it will strip the double quotes. Fixes: #2195 Signed-off-by: Felix Abecassis --- diff --git a/templates/lxc-oci.in b/templates/lxc-oci.in index d843a079e..4dca46ac0 100644 --- a/templates/lxc-oci.in +++ b/templates/lxc-oci.in @@ -100,8 +100,8 @@ getep() { configpath="$1" - ep=$(jq -c -r '.config.Entrypoint[]?'< "${configpath}") - cmd=$(jq -c -r '.config.Cmd[]?' < "${configpath}") + ep=$(jq -c '.config.Entrypoint[]?'< "${configpath}" | tr '\n' ' ') + cmd=$(jq -c '.config.Cmd[]?'< "${configpath}" | tr '\n' ' ') if [ -z "${ep}" ]; then ep="${cmd}" if [ -z "${ep}" ]; then