[debian-edu-commits] r81466 - in branches/wheezy/debian-edu-config: debian etc/NetworkManager/dispatcher.d
pere at alioth.debian.org
pere at alioth.debian.org
Mon Jul 8 19:19:58 UTC 2013
Author: pere
Date: 2013-07-08 19:19:57 +0000 (Mon, 08 Jul 2013)
New Revision: 81466
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/etc/NetworkManager/dispatcher.d/02debian-edu-config
Log:
Add workaround to make sure machines using Network Manager also call
the dhclient hooks, to get the correct proxy and hostname set during
boot, as well as the clock synced using NTP when connecting to a
network.
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-07-08 09:17:07 UTC (rev 81465)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-07-08 19:19:57 UTC (rev 81466)
@@ -1,3 +1,13 @@
+debian-edu-config (1.709~svn81460) UNRELEASED; urgency=low
+
+ [ Petter Reinholdtsen ]
+ * Add workaround to make sure machines using Network Manager also call
+ the dhclient hooks, to get the correct proxy and hostname set during
+ boot, as well as the clock synced using NTP when connecting to a
+ network.
+
+ -- Petter Reinholdtsen <pere at debian.org> Mon, 08 Jul 2013 21:18:24 +0200
+
debian-edu-config (1.709~svn81459) wheezy-test; urgency=low
[ Petter Reinholdtsen ]
Modified: branches/wheezy/debian-edu-config/etc/NetworkManager/dispatcher.d/02debian-edu-config
===================================================================
--- branches/wheezy/debian-edu-config/etc/NetworkManager/dispatcher.d/02debian-edu-config 2013-07-08 09:17:07 UTC (rev 81465)
+++ branches/wheezy/debian-edu-config/etc/NetworkManager/dispatcher.d/02debian-edu-config 2013-07-08 19:19:57 UTC (rev 81466)
@@ -7,6 +7,36 @@
exit 1;
fi
+# Workaround for misfeature in Network Manager, see
+# <URL: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/293139 >
+# Set the variables used by scripts installed by default in Debian Edu
+# Wheezy and a few others. Fake call to dhclient hook.
+run_dhclient_exit_hooks() {
+ new_interface="$1"
+ case "$2" in
+ up|vpn-up)
+ reason=BOUND
+ ;;
+ down|vpn-down)
+ reason=STOP
+ ;;
+ *)
+ return
+ ;;
+ esac
+ export reason
+ if [ "$DHCP4_IP_ADDRESS" ] ; then new_ip_address="$DHCP4_IP_ADDRESS" ; export new_ip_address ; fi
+ if [ "$DHCP4_NTP_SERVERS" ] ; then new_ntp_servers="$DHCP4_NTP_SERVERS" ; export new_ntp_servers ; fi
+ if [ "$DHCP4_BROADCAST_ADDRESS" ] ; then new_broadcast_address="$DHCP4_BROADCAST_ADDRESS" ; export new_broadcast_address ; fi
+ if [ "$DHCP4_SUBNET_MASK" ] ; then new_subnet_mask="$DHCP4_SUBNET_MASK" ; export new_subnet_mask ; fi
+ if [ "$DHCP4_HOST_NAME" ] ; then new_host_name="$DHCP4_HOST_NAME" ; export new_host_name ; fi
+ for f in /etc/dhcp/dhclient-exit-hooks.d/*; do
+ sh $f
+ done
+}
+
+run_dhclient_exit_hooks "$1" "$2"
+
case "$2" in
up|vpn-up)
if [ -e /etc/debian-edu/config ] ; then
More information about the debian-edu-commits
mailing list