[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Fix loss of dynamically allocated v4 IP address. (Closes: #966129)

Wolfgang Schweer gitlab at salsa.debian.org
Thu Jul 23 14:22:15 BST 2020



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
00424880 by Wolfgang Schweer at 2020-07-23T15:20:53+02:00
Fix loss of dynamically allocated v4 IP address. (Closes: #966129)

Drop etc/network/if-up.d/wpad-proxy-update. This script fails to work due
to changed behaviour of the ifupdown/dhclient/systemd combination and now
also causes the loss of a dynamically allocated ipv4 IP address about 30
minutes after booting.

Add code to d/debian-edu-config.postinstall to implement the intended
proxy setting update after a WPAD change just after rebooting the system.
(It would otherwise happen at first DHCP lease renewal ~15 minutes later.)

Adjust Makefile and debian/dirs.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


5 changed files:

- Makefile
- debian/changelog
- debian/debian-edu-config.postinst
- debian/dirs
- − etc/network/if-up.d/wpad-proxy-update


Changes:

=====================================
Makefile
=====================================
@@ -100,7 +100,6 @@ SYSCONFFILES = \
 	insserv/overrides/ntp \
 	ldap/rootDSE-debian-edu.ldif \
 	ldap/slapd-debian-edu.conf \
-	network/if-up.d/wpad-proxy-update \
 	samba/netlogon/1stlogon/1stlogon.bat \
 	samba/netlogon/config/get_time.bat \
 	samba/netlogon/config/penguin.bat \


=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+debian-edu-config (2.11.29) UNRELEASED; urgency=medium
+
+  * Fix loss of dynamically allocated v4 IP address. (Closes: #966129)
+    - Drop etc/network/if-up.d/wpad-proxy-update. This script fails to work due
+      to changed behaviour of the ifupdown/dhclient/systemd combination and now
+      also causes the loss of a dynamically allocated ipv4 IP address about 30
+      minutes after booting.
+    - Add code to d/debian-edu-config.postinstall to implement the intended
+      proxy setting update after a WPAD change just after rebooting the system.
+      (It would otherwise happen at first DHCP lease renewal ~15 minutes later.)
+    - Adjust Makefile and debian/dirs.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Mon, 20 Jul 2020 22:17:56 +0200
+
 debian-edu-config (2.11.28) unstable; urgency=medium
 
   [ Wolfgang Schweer ]


=====================================
debian/debian-edu-config.postinst
=====================================
@@ -159,20 +159,22 @@ configure)
     chmod 600 /etc/sssd/sssd-debian-edu.conf
     chown root:root /etc/sssd/sssd-debian-edu.conf
 
-    # The scripts in /etc/network/if-up.d need to be executable.
-    # Drop wpad-proxy-update for the main server, it makes no sense to run the
-    # script at this time. Also drop it for the gateway, it doesn't make sense.
-    if egrep -q "(Main-Server)" /etc/debian-edu/config || grep -q gateway /etc/hostname; then
-        rm -f /etc/network/if-up.d/wpad-proxy-update
-    else
-	chmod +x /etc/network/if-up.d/wpad-proxy-update
-    fi
+    # Add post-up stanza to interfaces file to let proxy changes take effect
+    # immediately after reboot (would take up to 15 min. otherwise). Exclude the
+    # gateway; the script doesn't make sense and would taint network setup.
+		rm -f /etc/network/if-up.d/wpad-proxy-update
+        if [ -f /etc/network/interfaces ] && ! grep -q gateway /etc/hostname && \
+	    ! grep -q update-proxy /etc/network/interfaces ; then
+		sed -i '/iface eth0 inet dhcp/a \    post-up \/usr\/share\/debian-edu-config\/tools\/update-proxy-from-wpad' \
+		/etc/network/interfaces
+        fi
 
     # Add post-up stanza to interfaces file to let hostname changes take effect
     # immediately after reboot (would take up to 15 min. otherwise). Exclude the
     # gateway; the script doesn't make sense and would taint network setup.
+		rm -f /etc/network/if-up.d/hostname
         if [ -f /etc/network/interfaces ] && ! grep -q gateway /etc/hostname && \
-	    ! grep -q post-up /etc/network/interfaces ; then
+	    ! grep -q update-hostname /etc/network/interfaces ; then
 		sed -i '/iface eth0 inet dhcp/a \    post-up \/usr\/sbin\/update-hostname-from-ip' \
 		/etc/network/interfaces
         fi


=====================================
debian/dirs
=====================================
@@ -14,7 +14,6 @@ etc/init.d
 etc/ldap/schema
 etc/ldap/ssl
 etc/ltsp
-etc/network/if-up.d/
 etc/pam.d
 etc/slbackup/pre.d
 etc/samba


=====================================
etc/network/if-up.d/wpad-proxy-update deleted
=====================================
@@ -1,13 +0,0 @@
-#!/bin/sh
-# Update proxy settings using wpad-url DHCP option or
-# http://wpad/wpad.dat when a DHCP update arrives
-
-if [ -r /etc/debian-edu/config ] ; then
-    . /etc/debian-edu/config
-fi
-
-if [ false = "$DHCP_WPAD_PROXY_UPDATE" ] ; then
-    exit 0
-fi
-
-/usr/share/debian-edu-config/tools/update-proxy-from-wpad



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/004248802b0d619599422407960ad7fdfee9e5bc

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/004248802b0d619599422407960ad7fdfee9e5bc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20200723/5da9f7c1/attachment-0001.html>


More information about the debian-edu-commits mailing list