In /usr/bin/autopkgtest-build-lxc line 49: if [ -n "$SCRIPT" -a ! -r "$SCRIPT" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/autopkgtest-build-lxc line 55: LXCDIR=`lxc-config lxc.lxcpath` || LXCDIR=`lxc-config lxcpath` || LXCDIR=/var/lib/lxc ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: LXCDIR=$(lxc-config lxc.lxcpath) || LXCDIR=$(lxc-config lxcpath) || LXCDIR=/var/lib/lxc In /usr/bin/autopkgtest-build-lxc line 70: RES=`apt-config shell proxy Acquire::http::Proxy` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: RES=$(apt-config shell proxy Acquire::http::Proxy) In /usr/bin/autopkgtest-build-lxc line 71: eval $RES ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval "$RES" In /usr/bin/autopkgtest-build-lxc line 72: if echo "${proxy:-}" | egrep -q '(localhost|127\.0\.0\.[0-9]*)'; then ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead. In /usr/bin/autopkgtest-build-lxc line 78: local bridge_interface=$(awk '{ if ($1 == "lxc.network.link") print($3)}' /etc/lxc/default.conf) ^--------------------^ SC2039: In POSIX sh, 'local' is undefined. ^--------------^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/autopkgtest-build-lxc line 80: local bridge_ip=$(ip -4 a show dev "$bridge_interface" | awk '/ inet / {sub(/\/.*$/, "", $2); print $2}') || true ^-------------^ SC2039: In POSIX sh, 'local' is undefined. ^-------^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/autopkgtest-build-lxc line 108: echo "Acquire::http { Proxy \"$AUTOPKGTEST_APT_PROXY\"; };" > $LXCDIR/$1/rootfs/etc/apt/apt.conf.d/01proxy ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo "Acquire::http { Proxy \"$AUTOPKGTEST_APT_PROXY\"; };" > $LXCDIR/"$1"/rootfs/etc/apt/apt.conf.d/01proxy In /usr/bin/autopkgtest-build-lxc line 111: lxc-start --daemon --name=$1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: lxc-start --daemon --name="$1" In /usr/bin/autopkgtest-build-lxc line 117: O=`lxc-attach --name=$1 runlevel 2>/dev/null` || continue ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: O=$(lxc-attach --name="$1" runlevel 2>/dev/null) || continue In /usr/bin/autopkgtest-build-lxc line 122: lxc-stop --kill --name=$1 || true ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: lxc-stop --kill --name="$1" || true In /usr/bin/autopkgtest-build-lxc line 123: lxc-destroy --name=$1 || true ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: lxc-destroy --name="$1" || true In /usr/bin/autopkgtest-build-lxc line 128: if ! echo '[ ! -d /run/systemd/system ] || systemctl start network-online.target' | timeout 60 lxc-attach --name=$1 -- sh -e; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if ! echo '[ ! -d /run/systemd/system ] || systemctl start network-online.target' | timeout 60 lxc-attach --name="$1" -- sh -e; then In /usr/bin/autopkgtest-build-lxc line 140: for script in $(dirname $(dirname "$0"))/setup-commands/setup-testbed \ ^-------------^ SC2046: Quote this to prevent word splitting. In /usr/bin/autopkgtest-build-lxc line 144: cat "$script" | lxc-attach --name=$1 env \ ^-------^ SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: cat "$script" | lxc-attach --name="$1" env \ In /usr/bin/autopkgtest-build-lxc line 147: MIRROR=${MIRROR:-} \ ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: MIRROR="${MIRROR:-}" \ In /usr/bin/autopkgtest-build-lxc line 156: cat "$SCRIPT" | lxc-attach --name=$1 env MIRROR=${MIRROR:-} sh ^-------^ SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. ^-- SC2086: Double quote to prevent globbing and word splitting. ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: cat "$SCRIPT" | lxc-attach --name="$1" env MIRROR="${MIRROR:-}" sh In /usr/bin/autopkgtest-build-lxc line 159: lxc-stop --name=$1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: lxc-stop --name="$1" In /usr/bin/autopkgtest-build-lxc line 171: if [ ! -e $LXCDIR/$NAME ]; then ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ ! -e $LXCDIR/"$NAME" ]; then In /usr/bin/autopkgtest-build-lxc line 173: $LXC_CREATE_PREFIX lxc-create -B best --name=$NAME $LXC_ARGS ^---^ SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: $LXC_CREATE_PREFIX lxc-create -B best --name="$NAME" "$LXC_ARGS" In /usr/bin/autopkgtest-build-lxc line 174: setup $NAME ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: setup "$NAME" In /usr/bin/autopkgtest-build-lxc line 178: btrfs subvolume delete /var/cache/lxc/$CACHE/rootfs-* 2>/dev/null || rm -rf /var/cache/lxc/$CACHE/rootfs-* ^----^ SC2086: Double quote to prevent globbing and word splitting. ^----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: btrfs subvolume delete /var/cache/lxc/"$CACHE"/rootfs-* 2>/dev/null || rm -rf /var/cache/lxc/"$CACHE"/rootfs-* In /usr/bin/autopkgtest-build-lxc line 180: if lxc-ls | grep -q ${NAME}.new ; then ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if lxc-ls | grep -q "${NAME}".new ; then In /usr/bin/autopkgtest-build-lxc line 181: lxc-destroy --force --name=${NAME}.new ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: lxc-destroy --force --name="${NAME}".new In /usr/bin/autopkgtest-build-lxc line 184: $LXC_CREATE_PREFIX lxc-create -B best --name=${NAME}.new $LXC_ARGS ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: $LXC_CREATE_PREFIX lxc-create -B best --name="${NAME}".new "$LXC_ARGS" In /usr/bin/autopkgtest-build-lxc line 185: setup ${NAME}.new ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: setup "${NAME}".new In /usr/bin/autopkgtest-build-lxc line 186: sed -i "s/${NAME}.new/${NAME}/" $LXCDIR/${NAME}.new/rootfs/etc/hostname $LXCDIR/${NAME}.new/rootfs/etc/hosts ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: sed -i "s/${NAME}.new/${NAME}/" $LXCDIR/"${NAME}".new/rootfs/etc/hostname $LXCDIR/"${NAME}".new/rootfs/etc/hosts In /usr/bin/autopkgtest-build-lxc line 188: mv $LXCDIR/${NAME}.new/rootfs $LXCDIR/${NAME}/rootfs.new ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mv $LXCDIR/"${NAME}".new/rootfs $LXCDIR/"${NAME}"/rootfs.new In /usr/bin/autopkgtest-build-lxc line 189: mv $LXCDIR/${NAME}/rootfs $LXCDIR/${NAME}/rootfs.old ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mv $LXCDIR/"${NAME}"/rootfs $LXCDIR/"${NAME}"/rootfs.old In /usr/bin/autopkgtest-build-lxc line 190: mv $LXCDIR/${NAME}/rootfs.new $LXCDIR/${NAME}/rootfs ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mv $LXCDIR/"${NAME}"/rootfs.new $LXCDIR/"${NAME}"/rootfs In /usr/bin/autopkgtest-build-lxc line 192: subvols=$(btrfs subvolume list -o $LXCDIR/${NAME}/rootfs.old 2>/dev/null | awk "/\/rootfs.old/ {print \$(NF)}") || true ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: subvols=$(btrfs subvolume list -o $LXCDIR/"${NAME}"/rootfs.old 2>/dev/null | awk "/\/rootfs.old/ {print \$(NF)}") || true In /usr/bin/autopkgtest-build-lxc line 196: btrfs subvolume delete $LXCDIR/${NAME}/rootfs.old 2>/dev/null || rm -rf $LXCDIR/${NAME}/rootfs.old ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: btrfs subvolume delete $LXCDIR/"${NAME}"/rootfs.old 2>/dev/null || rm -rf $LXCDIR/"${NAME}"/rootfs.old In /usr/bin/autopkgtest-build-lxc line 197: mkdir $LXCDIR/${NAME}.new/rootfs ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: mkdir $LXCDIR/"${NAME}".new/rootfs In /usr/bin/autopkgtest-build-lxc line 198: lxc-destroy --name=${NAME}.new ^-----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: lxc-destroy --name="${NAME}".new For more information: https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...