Skip to content

Commit

Permalink
Merge pull request lxc#2246 from flx42/lxc-oci-cmd-parsing-and-umoci
Browse files Browse the repository at this point in the history
lxc-oci: cmd parsing and less verbose umoci
  • Loading branch information
Christian Brauner authored Mar 29, 2018
2 parents 5b66b6e + 845ba28 commit 68c084c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/lxc-oci.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -312,7 +312,7 @@ if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ]; then
fi
# shellcheck disable=SC2039
# shellcheck disable=SC2068
umoci unpack ${umoci_args[@]} --image "${DOWNLOAD_TEMP}:latest" "${LXC_ROOTFS}.tmp"
umoci --log=error unpack ${umoci_args[@]} --image "${DOWNLOAD_TEMP}:latest" "${LXC_ROOTFS}.tmp"
rmdir "${LXC_ROOTFS}"
mv "${LXC_ROOTFS}.tmp/rootfs" "${LXC_ROOTFS}"

Expand Down

0 comments on commit 68c084c

Please sign in to comment.