echo "PASS"
}
+ARCH=i386
+if type dpkg >/dev/null 2>&1; then
+ ARCH=$(dpkg --print-architecture)
+fi
+
trap cleanup EXIT HUP INT TERM
set -eu
# Create a container
CONTAINER_NAME=lxc-test-auto
-lxc-create -t download -n $CONTAINER_NAME -- -d ubuntu -r trusty -a i386
+lxc-create -t download -n $CONTAINER_NAME -- -d ubuntu -r trusty -a $ARCH
CONTAINER_PATH=$(dirname $(lxc-info -n $CONTAINER_NAME -c lxc.rootfs -H))
cp $CONTAINER_PATH/config $CONTAINER_PATH/config.bak
TUSER=lxcunpriv
HDIR=/home/$TUSER
+ARCH=i386
+if type dpkg >/dev/null 2>&1; then
+ ARCH=$(dpkg --print-architecture)
+fi
+
trap cleanup EXIT SIGHUP SIGINT SIGTERM
set -eu
echo $$ > $d/lxctest/tasks
done
-run_cmd lxc-create -t download -n c1 -- -d ubuntu -r trusty -a i386
+run_cmd lxc-create -t download -n c1 -- -d ubuntu -r trusty -a $ARCH
run_cmd lxc-start -n c1 -d
p1=$(run_cmd lxc-info -n c1 -p -H)
fi
}
+ARCH=i386
+if type dpkg >/dev/null 2>&1; then
+ ARCH=$(dpkg --print-architecture)
+fi
+
set -eu
trap cleanup EXIT SIGHUP SIGINT SIGTERM
ifconfig usernic-br0 0.0.0.0 up
ifconfig usernic-br1 0.0.0.0 up
+ARCH=i386
+if type dpkg >/dev/null 2>&1; then
+ ARCH=$(dpkg --print-architecture)
+fi
+
# Create three containers
-run_cmd "lxc-create -t download -n b1 -- -d ubuntu -r trusty -a i386"
+run_cmd "lxc-create -t download -n b1 -- -d ubuntu -r trusty -a $ARCH"
run_cmd "lxc-start -n b1 -d"
p1=$(run_cmd "lxc-info -n b1 -p -H")