b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/templates/lxc-download.in |
| 2 | +++ b/templates/lxc-download.in |
| 3 | @@ -512,20 +512,7 @@ fi |
| 4 | # Unpack the rootfs |
| 5 | echo "Unpacking the rootfs" |
| 6 | |
| 7 | -EXCLUDES="" |
| 8 | -excludelist=$(relevant_file excludes) |
| 9 | -if [ -f "${excludelist}" ]; then |
| 10 | - while read -r line; do |
| 11 | - EXCLUDES="${EXCLUDES} --exclude=${line}" |
| 12 | - done < "${excludelist}" |
| 13 | -fi |
| 14 | - |
| 15 | -# Do not surround ${EXCLUDES} by quotes. This does not work. The solution could |
| 16 | -# use array but this is not POSIX compliant. The only POSIX compliant solution |
| 17 | -# is to use a function wrapper, but the latter can't be used here as the args |
| 18 | -# are dynamic. We thus need to ignore the warning brought by shellcheck. |
| 19 | -# shellcheck disable=SC2086 |
| 20 | -tar --anchored ${EXCLUDES} --numeric-owner -xpJf "${LXC_CACHE_PATH}/rootfs.tar.xz" -C "${LXC_ROOTFS}" |
| 21 | +tar --numeric-owner -xpJf "${LXC_CACHE_PATH}/rootfs.tar.xz" -C "${LXC_ROOTFS}" |
| 22 | |
| 23 | mkdir -p "${LXC_ROOTFS}/dev/pts/" |
| 24 | |