summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-01-31 21:56:37 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-02-01 10:01:38 +0000
commit669e1d136488def6dbd03ecdab533ab9e884f11d (patch)
treed222a6e56acb706bf8cc42e78f4ed6c6f127c1f4
parentc9529d7400d265dab91021b640f41ae465e53efb (diff)
start-container-schroot.sh: Start schroot session remotely.
Change-Id: I7de4615d9a40b8b9542b0eebb24ac61162280cbe
-rwxr-xr-xstart-container-schroot.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/start-container-schroot.sh b/start-container-schroot.sh
index 0ffe9766..6f62e51d 100755
--- a/start-container-schroot.sh
+++ b/start-container-schroot.sh
@@ -27,18 +27,19 @@ session_host=${session_host}.tcwglab
session_port=22
schroot_image="tcwg-build-${container_arch}-${distro}"
-session_id=$(schroot -b -c chroot:$schroot_image --preserve-environment)
+SCHROOT="ssh ${session_host} schroot"
+session_id=$(${SCHROOT} -b -c chroot:$schroot_image --preserve-environment)
if [ x"$session_id" = x ]; then
exit 1
fi
cat <<EOF
-ulimit -u 5000
+ulimit -u 5000 # FIXME how to support this remotely?
# Sometimes /dev/pts can't get unmounted on the first try.
# Workaround by retrying.
-trap "{ schroot -f -e -c session:$session_id || { sleep 60 ; schroot -f -e -c session:$session_id; } || true; }" EXIT
-CONTAINER="schroot -r -c session:$session_id --preserve-environment -- bash -c"
+trap "{ ${SCHROOT} -f -e -c session:$session_id || { sleep 60 ; ${SCHROOT} -f -e -c session:$session_id; } || true; }" EXIT
+CONTAINER="${SCHROOT} -r -c session:$session_id --preserve-environment -- "
session_host=${session_host}
session_port=${session_port}
EOF