summaryrefslogtreecommitdiffstats
path: root/remote/setup_target
diff options
context:
space:
mode:
authorJonathan Bauer2014-01-21 15:00:44 +0100
committerJonathan Bauer2014-01-21 15:00:44 +0100
commite5f32bab510f05fa3f68edb1db84718dc09eaca9 (patch)
treec27a4f01899a17fcf4c5a21eb900197b059c7709 /remote/setup_target
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-e5f32bab510f05fa3f68edb1db84718dc09eaca9.tar.gz
tm-scripts-e5f32bab510f05fa3f68edb1db84718dc09eaca9.tar.xz
tm-scripts-e5f32bab510f05fa3f68edb1db84718dc09eaca9.zip
[remote/setup_target] only export remote/builds to /export/build if it
is not already mounted.
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-xremote/setup_target4
1 files changed, 4 insertions, 0 deletions
diff --git a/remote/setup_target b/remote/setup_target
index 5fc68a4f..11a8ffbb 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -120,6 +120,10 @@ read_build () {
export_builds() {
[ ! -d "${MODE_DIR}/builds" ] && perror "No ${MODE_DIR}/builds, nothing to export."
+ if mount|grep -q tm-scripts/remote/builds; then
+ pwarning "${MODE_DIR}/builds already exported! Ignoring..."
+ return 1;
+ fi
pinfo "Mounting ${MODE_DIR}/builds to ${EXPORT_DIR}. This will make the local builds syncable from another machine."
[ ! -d "${EXPORT_DIR}" ] && mkdir -p "${EXPORT_DIR}"
mount --bind ${MODE_DIR}/builds ${EXPORT_DIR} || perror "Failed to bind mount ${MODE_DIR}/builds to ${EXPORT_DIR}"