[debian-edu-commits] debian-edu/ 02/02: Add new dhclient hook to work around bug #710490 where a race in autofs make it fail with slow DHCP servers.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu Nov 13 16:59:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-config.

commit 72b181854febf23a51dc0d9a5df1d439b2a7ca73
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Nov 13 17:58:47 2014 +0100

    Add new dhclient hook to work around bug #710490 where a race in autofs make it fail with slow DHCP servers.
---
 debian/changelog                             |  2 ++
 etc/dhcp/dhclient-exit-hooks.d/autofs-reload | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4a09780..aef83ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ debian-edu-config (1.814) UNRELEASED; urgency=low
     and /dev/xvd* in addition to /dev/sd*, allowing virtual machines
     using virtio, Xen and the old device names to install
     automatically too.
+  * Add new dhclient hook to work around bug #710490 where a race in
+    autofs make it fail with slow DHCP servers.
 
   [ Wolfgang Schweer ]
   * testsuite/network: cover case that udev persistent network card rules
diff --git a/etc/dhcp/dhclient-exit-hooks.d/autofs-reload b/etc/dhcp/dhclient-exit-hooks.d/autofs-reload
new file mode 100755
index 0000000..7e9830c
--- /dev/null
+++ b/etc/dhcp/dhclient-exit-hooks.d/autofs-reload
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Workaround for 710490 where autofs cache failing DNS entries
+# when started before the network is up.
+
+if [ -r /etc/debian-edu/config ] ; then
+    . /etc/debian-edu/config
+fi
+
+if [ false = "$DHCP_AUTOFS_UPDATE" ] ; then
+    exit 0
+fi
+
+case $reason in
+    BOUND|RENEW|REBIND|REBOOT)
+	service autofs reload
+	;;
+    EXPIRE|FAIL|RELEASE|STOP)
+	;;
+esac

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list