summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-01-14 22:42:07 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-14 22:42:07 +0100
commitc918af6ac77c75eecb7977e0c2f776e585040de0 (patch)
treec6b2c91ad98d6602665aae13df27e705b46ec285 /bin
parentebdf02023335802d6b5110d748769a558f9c370d (diff)
downloadjenkins.debian.net-c918af6ac77c75eecb7977e0c2f776e585040de0.tar.xz
reproducible Debian: test whether /run/shm is a link pointing to /dev/shm, thanks #851427
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 6386c2a2..d747fa59 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