summaryrefslogtreecommitdiff
path: root/start-container-qemu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'start-container-qemu.sh')
-rwxr-xr-xstart-container-qemu.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/start-container-qemu.sh b/start-container-qemu.sh
index ebab1edb..9695ddc4 100755
--- a/start-container-qemu.sh
+++ b/start-container-qemu.sh
@@ -28,6 +28,8 @@ while [ $# -gt 0 ]; do
shift 2
done
+set -u
+
container=$(mktemp)
# Run container as privileged to mount host's /dev inside container to gain
@@ -64,7 +66,7 @@ nfsip=$(docker -H $host:2375 inspect --format {{.NetworkSettings.IPAddress}} "$c
# package on the host.
bind_mounts=($(print_bind_mounts "$task"))
echo "$nfsroot *(rw,async,no_root_squash,no_subtree_check,insecure)" | container_exec sudo tee -a /etc/exports
-for bind_mount in "${bind_mounts[@]}"; do
+test_array bind_mounts && for bind_mount in "${bind_mounts[@]}"; do
dir="$(echo $bind_mount | cut -s -d: -f 2)"
rw="$(echo $bind_mount | cut -s -d: -f 3)"
rw="${rw:-rw}"