[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: test whether /run/shm is a link pointing to /dev/shm, thanks #851427
Holger Levsen
holger at layer-acht.org
Sat Jan 14 21:42:12 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 c918af6ac77c75eecb7977e0c2f776e585040de0
Author: Holger Levsen <holger at layer-acht.org>
Date: Sat Jan 14 22:42:07 2017 +0100
reproducible Debian: test whether /run/shm is a link pointing to /dev/shm, thanks #851427
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_maintenance.sh | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 6386c2a..d747fa5 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -54,6 +54,10 @@ fi
show_fstab_and_mounts() {
echo "################################"
+ echo "/dev/shm and /run/shm on $HOSTNAME"
+ echo "################################"
+ ls -lartd /run/shm /dev/shm/
+ echo "################################"
echo "/etc/fstab on $HOSTNAME"
echo "################################"
cat /etc/fstab
@@ -61,6 +65,7 @@ show_fstab_and_mounts() {
echo "mount output on $HOSTNAME"
echo "################################"
mount
+ echo "################################"
}
# for Debian, first run some checks…
@@ -79,11 +84,10 @@ if [ $? -ne 0 ] ; then
echo "Warning: /dev/shm is not mounted correctly on $HOSTNAME, please tell the jenkins admins to fix this."
show_fstab_and_mounts
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
- echo "Warning: /run/shm is not mounted correctly on $HOSTNAME, please tell the jenkins admins to fix this."
+# check for /run/shm being a link to /dev/shm
+echo "$(date -u) - testing whether /run/shm is a link..."
+if ! test -L /run/shm || [ "$(readlink /run/shm)" != "/dev/shm" ] ; then
+ echo "Warning: /run/shm not a link or not pointing to /dev/shm on $HOSTNAME, please tell the jenkins admins to fix this."
show_fstab_and_mounts
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