[debian-edu-commits] r80172 - in branches/wheezy/debian-edu-config: debian testsuite
pere at alioth.debian.org
pere at alioth.debian.org
Tue May 21 12:24:21 UTC 2013
Author: pere
Date: 2013-05-21 12:24:20 +0000 (Tue, 21 May 2013)
New Revision: 80172
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/testsuite/network
Log:
Rewrite ping/ping6 testsuite check to only try ping6 if IPv6
address is available for the local hostname.
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-05-21 10:45:50 UTC (rev 80171)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-05-21 12:24:20 UTC (rev 80172)
@@ -6,6 +6,8 @@
[ Petter Reinholdtsen ]
* Make sssd-generate-config more robust, by looking for DNS domain in
resolv.conf if hostname is not FQDN.
+ * Rewrite ping/ping6 testsuite check to only try ping6 if IPv6
+ address is available for the local hostname.
-- Holger Levsen <holger at debian.org> Mon, 20 May 2013 15:24:21 +0200
Modified: branches/wheezy/debian-edu-config/testsuite/network
===================================================================
--- branches/wheezy/debian-edu-config/testsuite/network 2013-05-21 10:45:50 UTC (rev 80171)
+++ branches/wheezy/debian-edu-config/testsuite/network 2013-05-21 12:24:20 UTC (rev 80172)
@@ -119,14 +119,23 @@
fi
fi
-# check if <URL: http://bugs.debian.org/705900 > is present.
-for p in ping ping6; do
- if $p -c3 $(hostname) > /dev/null 2>&1 ; then
- success "$p $(hostname) work."
+# check if <URL: http://bugs.debian.org/705900 > is present. First
+# try IPv4.
+if ping -c3 $(hostname) > /dev/null 2>&1 ; then
+ success "ping $(hostname) work."
+else
+ error "ping $(hostname) fail, BTS #705900 present?"
+fi
+# Then try IPv6 if available
+if getent ahosts $(hostname) | grep -q : ; then
+ if ping6 -c3 $(hostname) > /dev/null 2>&1 ; then
+ success "ping6 $(hostname) work."
else
- error "$p $(hostname) fail, BTS #705900 present?"
+ error "ping6 $(hostname) fail, BTS #705900 present?"
fi
-done
+else
+ echo "info: not testing ping6, no IPv6 address found for $(hostname)."
+fi
if false && test "$server" = true && have_interface eth0; then
# Make sure we are the only main server on the net. Should not be
More information about the debian-edu-commits
mailing list