Commit 1a549068 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible Debian: ignore MTU on eth0 when checking for host health.



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent e505f083
...@@ -89,18 +89,6 @@ if [ $TIMEOUT -ne 0 ] ; then ...@@ -89,18 +89,6 @@ if [ $TIMEOUT -ne 0 ] ; then
exit 1 exit 1
fi fi
#
# check for correct MTU
#
echo "$(date -u) - testing whether the network interfaces MTU is 1500..."
if [ "$(ip link | sed -n '/LOOPBACK\|NOARP/!s/.* mtu \([0-9]*\) .*/\1/p' | sort -u)" != "1500" ] ; then
ip link
echo "$(date -u) - network interfaces MTU != 1500 - this is wrong. => please \`sudo ifconfig eth0 mtu 1500\`"
# should probably turn this into a warning if this becomes to annoying
echo "Warning: $HOSTNAME has wrong MTU, please tell the jenkins admins to fix this. (sudo ifconfig eth0 mtu 1500)"
DIRTY=true
fi
# #
# check for correct future # check for correct future
# #
......
...@@ -44,17 +44,6 @@ fixup_shm() { ...@@ -44,17 +44,6 @@ fixup_shm() {
chmod 1777 /dev/shm chmod 1777 /dev/shm
} }
fixup_mtu() {
# only act on systems which have eth0
if ip link show eth0 >/dev/null 2>&1 ; then
# if MTU != 1500 set it to 1500
if [ -z "$(ip link show eth0 | grep 'eth0:' | grep 'mtu 1500 ' || true)" ] ; then
ip link set dev eth0 mtu 1500
fi
ip link show eth0
fi
}
fixup_pbuilder_lockfiles() { fixup_pbuilder_lockfiles() {
rm -f /var/cache/pbuilder/*.tgz.tmp rm -f /var/cache/pbuilder/*.tgz.tmp
} }
...@@ -69,10 +58,6 @@ MESSAGE="$(hostname -f) rebooted" ...@@ -69,10 +58,6 @@ MESSAGE="$(hostname -f) rebooted"
# #
fixup_shm fixup_shm
#
# fixup eth0's MTU if needed
fixup_mtu
# #
# configure iptables to drop incoming UDP packets # configure iptables to drop incoming UDP packets
# #
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment