[debian-edu-commits] r81167 - in branches/wheezy/debian-edu-config: debian etc/dhcp/dhclient-exit-hooks.d
pere at alioth.debian.org
pere at alioth.debian.org
Tue Jun 25 13:28:03 UTC 2013
Author: pere
Date: 2013-06-25 13:28:03 +0000 (Tue, 25 Jun 2013)
New Revision: 81167
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/etc/dhcp/dhclient-exit-hooks.d/hostname
Log:
Adjust DHCP hook used to set hostname based on reverse DNS lookup,
to only set hostname if there is a name in DNS. This avoid
setting the hostname to '3(NXDOMAIN)'.
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-06-25 13:22:05 UTC (rev 81166)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-06-25 13:28:03 UTC (rev 81167)
@@ -6,6 +6,9 @@
* Add testsuite code to report an error if
/etc/rsyslog.d/debian-edu-client.conf only is readable by root.
* Add cfengine rule to set file mode 644 on the rsyslog.d file.
+ * Adjust DHCP hook used to set hostname based on reverse DNS lookup,
+ to only set hostname if there is a name in DNS. This avoid
+ setting the hostname to '3(NXDOMAIN)'.
-- Petter Reinholdtsen <pere at debian.org> Tue, 25 Jun 2013 10:37:49 +0200
Modified: branches/wheezy/debian-edu-config/etc/dhcp/dhclient-exit-hooks.d/hostname
===================================================================
--- branches/wheezy/debian-edu-config/etc/dhcp/dhclient-exit-hooks.d/hostname 2013-06-25 13:22:05 UTC (rev 81166)
+++ branches/wheezy/debian-edu-config/etc/dhcp/dhclient-exit-hooks.d/hostname 2013-06-25 13:28:03 UTC (rev 81167)
@@ -23,7 +23,7 @@
fi
case "$reason" in
BOUND|RENEW|REBIND|REBOOT)
- hostname=$(host $new_ip_address | cut -d ' ' -f 5 | cut -d '.' -f 1)
+ hostname=$(host $new_ip_address | grep 'domain name pointer' | cut -d ' ' -f 5 | cut -d '.' -f 1)
if [ "$hostname" != "$(uname -n)" ] ; then
echo dhclient-exit-hooks.d/hostname: Dynamic IP address = $new_ip_address
echo $hostname > /etc/hostname
More information about the debian-edu-commits
mailing list