[debian-edu-commits] r79984 - in branches/wheezy/debian-edu-config: debian testsuite
pere at alioth.debian.org
pere at alioth.debian.org
Mon May 6 19:00:27 UTC 2013
Author: pere
Date: 2013-05-06 19:00:27 +0000 (Mon, 06 May 2013)
New Revision: 79984
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/testsuite/ltsp
Log:
Rewrite LTSP testsuite check to use 'getent hosts' instead of 'host'
to look up the local hostname, and adjust the code to handle the
IPv6 localhost address returned by default.
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-05-06 18:02:11 UTC (rev 79983)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-05-06 19:00:27 UTC (rev 79984)
@@ -3,6 +3,9 @@
[ Petter Reinholdtsen ]
* Ask apt-xapian-index to reconfigure at first boot to avoid having to
wait a week before golearn start working.
+ * Rewrite LTSP testsuite check to use 'getent hosts' instead of 'host'
+ to look up the local hostname, and adjust the code to handle the
+ IPv6 localhost address returned by default.
-- Petter Reinholdtsen <pere at debian.org> Mon, 06 May 2013 16:08:40 +0200
Modified: branches/wheezy/debian-edu-config/testsuite/ltsp
===================================================================
--- branches/wheezy/debian-edu-config/testsuite/ltsp 2013-05-06 18:02:11 UTC (rev 79983)
+++ branches/wheezy/debian-edu-config/testsuite/ltsp 2013-05-06 19:00:27 UTC (rev 79984)
@@ -103,8 +103,13 @@
# Test if the LTSP chroots can be NFS mounted
myname=$(uname -n)
- # Workaround: use IP, just in case fqdn is not set in GOsa.
- myip=$(host "$myname"|cut -d" " -f4)
+ # Workaround: use IP, just in case fqdn is not yet set in GOsa.
+ myip=$(getent hosts "$myname"|awk '{print $1}')
+ case "$myip" in
+ *:*) # IPv6
+ myip="[$myip]"
+ ;;
+ esac
for m in $(showmount -e | grep /opt/ltsp | awk '{print $1}') ; do
if mount $myip:$m /mnt; then
echo "success: $0: mounting $myname:$m succeeded"
More information about the debian-edu-commits
mailing list