From e94e48877cb8f074ca65bd3ac67756cb512eabd8 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 3 Aug 2016 23:11:30 +0200 Subject: check whether network interface's MTU is 1500, else fail --- bin/reproducible_maintenance.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 946c2684..349a85b1 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -41,11 +41,18 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then cp -v $PACKAGES_DB $BASE/ fi -# for Debian -echo "$(date -u) - updating the schroots and pbuilder now..." +# for Debian, first run some checks… echo "$(date -u) - testing whether the proxy works..." curl http://www.debian.org > /dev/null +echo "$(date -u) - testing whether the network interfaces MTU is 1500..." +if [ "$(LANG=C /sbin/ifconfig | grep -i -v loopback | grep -i mtu | cut -d ":" -f2|cut -d " " -f1)" != "1500" ] ; then + /sbin/ifconfig + echo "$(date -u) - network interfaces MTU != 1500 - this is wrong." + exit 1 +fi set +e + +echo "$(date -u) - updating the schroots and pbuilder now..." # use host architecture (only) ARCH=$(dpkg --print-architecture) # use host apt proxy configuration for pbuilder -- cgit v1.2.3-70-g09d2