X-Git-Url: http://git.openwrt.org/?p=feed%2Fpackages.git;a=blobdiff_plain;f=utils%2Flxc%2Fpatches%2F025-remove-unsupported-option.patch;h=b20870890bb1ddc81fa8eca327870890a0cade36;hp=cb0a9f0d2a3084e72f2fc04b83079315e5555cd3;hb=9672b88d2a984ff33434002c595b2168f91f15e4;hpb=9b9ef2375d46e5f2eefafe00cd188764287257c4 diff --git a/utils/lxc/patches/025-remove-unsupported-option.patch b/utils/lxc/patches/025-remove-unsupported-option.patch index cb0a9f0d2a..b20870890b 100644 --- a/utils/lxc/patches/025-remove-unsupported-option.patch +++ b/utils/lxc/patches/025-remove-unsupported-option.patch @@ -1,19 +1,24 @@ --- a/templates/lxc-download.in +++ b/templates/lxc-download.in -@@ -494,15 +494,7 @@ fi +@@ -505,20 +505,7 @@ fi # Unpack the rootfs echo "Unpacking the rootfs" -EXCLUDES="" -excludelist=$(relevant_file excludes) -if [ -f "${excludelist}" ]; then -- while read line; do -- EXCLUDES="$EXCLUDES --exclude=$line" -- done < $excludelist +- while read -r line; do +- EXCLUDES="${EXCLUDES} --exclude=${line}" +- done < "${excludelist}" -fi - +-# Do not surround ${EXCLUDES} by quotes. This does not work. The solution could +-# use array but this is not POSIX compliant. The only POSIX compliant solution +-# is to use a function wrapper, but the latter can't be used here as the args +-# are dynamic. We thus need to ignore the warning brought by shellcheck. +-# shellcheck disable=SC2086 -tar --anchored ${EXCLUDES} --numeric-owner -xpJf \ +tar --numeric-owner -xpJf \ - ${LXC_CACHE_PATH}/rootfs.tar.xz -C ${LXC_ROOTFS} + "${LXC_CACHE_PATH}/rootfs.tar.xz" -C "${LXC_ROOTFS}" - mkdir -p ${LXC_ROOTFS}/dev/pts/ + mkdir -p "${LXC_ROOTFS}/dev/pts/"