[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible Debian: properly test for /dev/shm and /run/shm
Holger Levsen
holger at layer-acht.org
Fri Jan 13 14:07:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 234fae048670d0aee68ec2e3066da0f7ff695d77
Author: Holger Levsen <holger at layer-acht.org>
Date: Fri Jan 13 15:07:46 2017 +0100
reproducible Debian: properly test for /dev/shm and /run/shm
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_maintenance.sh | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index afbb3d8..e4cae58 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -52,6 +52,17 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
fi
fi
+show_fstab_and_mounts() {
+ echo "################################"
+ echo "/etc/fstab on $HOSTNAME"
+ echo "################################"
+ cat /etc/fstab
+ echo "################################"
+ echo "mount output on $HOSTNAME"
+ echo "################################"
+ mount
+}
+
# for Debian, first run some checks…
set +e
# check for working proxy
@@ -61,12 +72,20 @@ if [ $? -ne 0 ] ; then
irc_message debian-reproducible "Proxy is down for $HOSTNAME, please tell the jenkins admins to fix this. (sudo service squid3 restart)"
exit 1
fi
-# check for /(run|dev)/shm being mounted
-echo "$(date -u) - testing whether /(run|dev)/shm is mounted correctly..."
+# check for /dev/shm being mounted properly
+echo "$(date -u) - testing whether /dev/shm is mounted correctly..."
mount | egrep -q "^tmpfs on /dev/shm" && test "$(stat -c %a -L /dev/shm)" = 1777
+if [ $? -ne 0 ] ; then
+ irc_message debian-reproducible "/dev/shm is not mounted correctly on $HOSTNAME, please tell the jenkins admins to fix this."
+ show_fstab_and_mounts
+ exit 1
+fi
+# check for /run/shm being mounted properly
+echo "$(date -u) - testing whether /run/shm is mounted correctly..."
mount | egrep -q "^tmpfs on /run/shm" && test "$(stat -c %a -L /run/shm)" = 1777
if [ $? -ne 0 ] ; then
- irc_message debian-reproducible "/(run|dev)/shm is not mounted correctly on $HOSTNAME, please tell the jenkins admins to fix this. (by adding 'none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0' to /etc/fstab"
+ irc_message debian-reproducible "/run/shm is not mounted correctly on $HOSTNAME, please tell the jenkins admins to fix this."
+ show_fstab_and_mounts
exit 1
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list