summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_maintenance.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-01-21 14:02:54 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-21 14:02:54 +0100
commit15cb9ff2280e874728f2213081ea5cd8902530d9 (patch)
tree184a50ebd1db6f095b6ab3fddae2b5509debb7eb /bin/reproducible_maintenance.sh
parent27bd26bb9781bba483726849b8ef808ea6d8f974 (diff)
downloadjenkins.debian.net-15cb9ff2280e874728f2213081ea5cd8902530d9.tar.xz
reproducible Debian: explicitly pin down the exact problem with /(dev|run)/shm
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-xbin/reproducible_maintenance.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 64427dd6..c13bc2e1 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -79,15 +79,23 @@ if [ $? -ne 0 ] ; then
fi
# 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
+mount | egrep -q "^tmpfs on /dev/shm"
if [ $? -ne 0 ] ; then
- echo "Warning: /dev/shm is not mounted correctly on $HOSTNAME, please tell the jenkins admins to fix this."
+ echo "Warning: /dev/shm is not mounted correctly on $HOSTNAME, it should be a tmpfs, please tell the jenkins admins to fix this."
+ show_fstab_and_mounts
+fi
+test "$(stat -c %a -L /dev/shm)" = 1777
+if [ $? -ne 0 ] ; then
+ echo "Warning: /dev/shm is not mounted correctly on $HOSTNAME, it should be mounted with 1777 permissions, please tell the jenkins admins to fix this."
show_fstab_and_mounts
fi
# 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."
+if ! test -L /run/shm ; then
+ echo "Warning: /run/shm is not a link on $HOSTNAME, please tell the jenkins admins to fix this."
+ show_fstab_and_mounts
+elif [ "$(readlink /run/shm)" != "/dev/shm" ] ; then
+ echo "Warning: /run/shm is a link, but not pointing to /dev/shm on $HOSTNAME, please tell the jenkins admins to fix this."
show_fstab_and_mounts
fi