summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-11-15 20:58:17 +0100
committerHolger Levsen <holger@layer-acht.org>2016-11-15 21:32:04 +0100
commit5c36516c608c72c1388390327dffd5aa9d95b6ea (patch)
tree0e9371000f731c60740b3270e0978125a3c37f9a
parent319bf91876a3f592da97115ef8d18a63bfc1d925 (diff)
downloadjenkins.debian.net-5c36516c608c72c1388390327dffd5aa9d95b6ea.tar.xz
pb10: make sure that /dev/vdb is mounted as .../vm-pools
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xupdate_jdn.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 6356c904..7e4780dc 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -185,6 +185,22 @@ case $HOSTNAME in
;;
*) ;;
esac
+case $HOSTNAME in
+ jenkins|profitbricks-build10-amd64)
+ [ -d /srv/lvc/vm-pools ] || sudo mkdir -p /srv/lvc/vm-pools
+ if ! grep -q '^/dev/vdb\s\+/srv/lvc/vm-pools\s' /etc/fstab; then
+ echo "/dev/vdb /srv/lvc/vm-pools ext4 errors=remount-ro 0 2" | sudo tee -a /etc/fstab >/dev/null
+ fi
+ if ! mountpoint -q /srv/lvc/vm-pools; then
+ if test -z "$(ls -A /srv/lvc/vm-pools)"; then
+ sudo mount /srv/lvc/vm-pools
+ else
+ explain "WARNING: mountpoint /srv/lvc/vm-pools is non-empty."
+ fi
+ fi
+ ;;
+ *) ;;
+esac
# make sure needed directories exists - some directories will not be needed on all hosts...
for directory in /schroots /srv/reproducible-results /srv/d-i /srv/udebs /srv/live-build /var/log/jenkins/ /srv/jenkins /srv/jenkins/pseudo-hosts /srv/workspace/chroots ; do