From f7c593de774ecaa1946b613adf6cc5abcbad7d11 Mon Sep 17 00:00:00 2001 Message-Id: From: Philipp Hahn Date: Fri, 9 Dec 2011 17:48:14 +0100 Subject: [PATCH 1/7] Bug #25377: Fix file permission Organization: Univention GmbH, Bremen, Germany Make /etc/init.d/dhcpd mode 0755. --- .../ucs/services/univention-dhcp/debian/changelog | 6 ++++++ .../univention-dhcp.univention-config-registry | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog index ed87734..f7ea5c3 100644 --- a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog +++ b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog @@ -1,5 +1,11 @@ univention-dhcp (6.0.22-1) unstable; urgency=low + * Fix file permission (Bug #25377) + + -- Philipp Hahn Fri, 09 Dec 2011 17:47:26 +0100 + +univention-dhcp (6.0.22-1) unstable; urgency=low + * fixed typo in UCR template; Bug #26838 -- Andreas Büsching Thu, 24 May 2012 09:13:42 +0200 diff --git a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.univention-config-registry b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.univention-config-registry index 3ecb377..594ca5a 100644 --- a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.univention-config-registry +++ b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.univention-config-registry @@ -13,6 +13,7 @@ Variables: domainname Type: file File: etc/init.d/isc-dhcp-server +Mode: 0755 Type: file File: etc/logrotate.d/univention-dhcp -- 1.7.1 From a55bd6c952747ca1e3278787cf4feb5e85ebcf8c Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Philipp Hahn Date: Fri, 9 Dec 2011 17:51:38 +0100 Subject: [PATCH 2/7] Bug #17802: Reference /etc/init.d/univention-dhcp Organization: Univention GmbH, Bremen, Germany Add reference to /etc/init.d/univention-dhcp into /etc/init.d/isc-dhcp-server. --- .../conffiles/etc/init.d/isc-dhcp-server | 2 ++ .../ucs/services/univention-dhcp/debian/changelog | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/branches/ucs-3.0/ucs/services/univention-dhcp/conffiles/etc/init.d/isc-dhcp-server b/branches/ucs-3.0/ucs/services/univention-dhcp/conffiles/etc/init.d/isc-dhcp-server index 49933f0..a14d589 100644 --- a/branches/ucs-3.0/ucs/services/univention-dhcp/conffiles/etc/init.d/isc-dhcp-server +++ b/branches/ucs-3.0/ucs/services/univention-dhcp/conffiles/etc/init.d/isc-dhcp-server @@ -40,4 +40,6 @@ # Description: Dynamic Host Configuration Protocol Server ### END INIT INFO +. /lib/lsb/init-functions +log_action_msg "This script is disabled, use /etc/init.d/univention-dhcp." exit 0 diff --git a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog index f7ea5c3..57ef3d0 100644 --- a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog +++ b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/changelog @@ -1,6 +1,7 @@ univention-dhcp (6.0.22-1) unstable; urgency=low * Fix file permission (Bug #25377) + * Reference /etc/init.d/univention-dhcp (Bug #17802) -- Philipp Hahn Fri, 09 Dec 2011 17:47:26 +0100 -- 1.7.1 From 6303abaa50a8c37d7c1d860db03e6e9cd06337d4 Mon Sep 17 00:00:00 2001 Message-Id: <6303abaa50a8c37d7c1d860db03e6e9cd06337d4.1341467633.git.hahn@univention.de> In-Reply-To: References: From: Philipp Hahn Date: Wed, 4 Jul 2012 21:33:22 +0200 Subject: [PATCH 3/7] Bug #24282: Move common data to univention-network-common Organization: Univention GmbH, Bremen, Germany ifplugd and nm both use the same files and UCR variable declarations. Move them to the -common package. --- .../univention-network-manager/debian/changelog | 6 +++ .../base/univention-network-manager/debian/control | 2 + .../base/univention-network-manager/debian/rules | 3 +- .../debian/univention-ifplugd.install | 5 --- .../univention-ifplugd.univention-config-registry | 11 ------ ...on-ifplugd.univention-config-registry-variables | 18 ---------- .../debian/univention-network-common.install | 5 +++ ...ntion-network-common.univention-config-registry | 10 +++++ ...ork-common.univention-config-registry-variables | 35 +++++++++++++++++++ .../debian/univention-network-manager.install | 4 -- ...tion-network-manager.univention-config-registry | 11 ------ ...rk-manager.univention-config-registry-variables | 36 -------------------- .../univention-dhcp/debian/univention-dhcp.preinst | 4 +- 13 files changed, 61 insertions(+), 89 deletions(-) create mode 100644 branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry create mode 100644 branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry-variables diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog index 60dcb24..6fb7767 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog @@ -1,3 +1,9 @@ +univention-network-manager (3.0.23-1) unstable; urgency=low + + * Move common data to univention-network-common (Bug #24282) + + -- Philipp Hahn Wed, 04 Jul 2012 20:29:33 +0200 + univention-network-manager (3.0.22-1) unstable; urgency=low * added file /etc/dhpc/dhclient.local.conf (Bug #24282) diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control index 87e52fb..0c967c8 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control @@ -43,6 +43,8 @@ Architecture: all Depends: ${misc:Depends}, univention-management-console-server, python-netifaces +Replaces: univention-network-manager, + univention-ifplugd Description: UCS - Network tools for ifplugd and network-manager (common) This package installs tools required by univention-ifplugd and univention-network-manager. diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules index e08caea..4886ac1 100755 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules @@ -37,8 +37,7 @@ override_dh_auto_test: override_dh_fixperms: dh_fixperms chmod 755 debian/univention-network-manager/usr/lib/NetworkManager/nm-dhcp-client.action - chmod 755 debian/univention-network-manager/etc/network/if-pre-up.d/10_dhclientconf - chmod 755 debian/univention-ifplugd/etc/network/if-pre-up.d/10_dhclientconf + chmod 755 debian/univention-network-common/etc/network/if-pre-up.d/10_dhclientconf chmod 755 debian/univention-ifplugd/etc/dhcp3/dhclient-enter-hooks.d/univention-ifplugd-enter-hook override_dh_installinit: diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install index 82f3b89..6deeb20 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install @@ -1,6 +1 @@ -etc/network/ucs-network-tools etc/network/ -etc/network/if-up.d/[0-9]* etc/network/if-up.d/ -etc/network/if-down.d/[0-9]* etc/network/if-down.d/ -etc/network/if-pre-up.d/[0-9]* etc/network/if-pre-up.d/ -etc/dhcp/* etc/dhcp/ univention-ifplugd-enter-hook etc/dhcp3/dhclient-enter-hooks.d/ diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry index 3349210..ae452d0 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry @@ -1,14 +1,3 @@ Type: file -File: etc/dhcp/dhclient.conf -Variables: dhclient/options/timeout -Variables: dhclient/options/retry -Variables: dhclient/options/ddns -Variables: dhclient/options/ddns/zone -Variables: dhclient/options/ddns/serverupdate -Variables: dhclient/linklocal/fallback -Variables: hostname -Variables: domainname - -Type: file File: etc/default/ifplugd Variables: interfaces/.* diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry-variables b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry-variables index e21e069..129edb9 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry-variables +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.univention-config-registry-variables @@ -9,21 +9,3 @@ Description[de]=Ist diese Variable gesetzt, dann wird versucht die Heimatverzeic Description[en]=If this variable is set the home directory share will be mounted via NFS if possible Type=bool Categories=system-base - -[dhclient/options/timeout] -Description[de]=Definiert die Zeit in Sekunden, die der DHCP-Client versucht eine IP-Konfiguration zu beziehen -Description[en]=Defines the amount of time in seconds that the DHCP clients tries to get an IP configuration -Type=int -Categories=system-base - -[dhclient/options/retry] -Description[de]=Definiert die Zeit in Sekunden, die der DHCP-Client vor einem erneuten Versuch wartet -Description[en]=Defines the amount of time in seconds that the DHCP clients waits before trying again -Type=int -Categories=system-base - -[dhclient/linklocal/fallback] -Description[de]=Definiert ob eine Link Local IP Adresse konfiguriert wird, wenn per DHCP keine IP Adresse bezogen werden konnte (Default: true) -Description[en]=Defines whether a link local IP address is configured if no IP address could be obtained via DHCP (default: true) -Type=str -Categories=system-base diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.install b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.install index e831f26..c2d0bbc 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.install +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.install @@ -1 +1,6 @@ +etc/network/ucs-network-tools etc/network/ +etc/network/if-up.d/[0-9]* etc/network/if-up.d/ +etc/network/if-down.d/[0-9]* etc/network/if-down.d/ +etc/network/if-pre-up.d/[0-9]* etc/network/if-pre-up.d/ +etc/dhcp/* etc/dhcp/ univention-register-network-address usr/sbin diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry new file mode 100644 index 0000000..5ba4577 --- /dev/null +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry @@ -0,0 +1,10 @@ +Type: file +File: etc/dhcp/dhclient.conf +Variables: dhclient/options/timeout +Variables: dhclient/options/retry +Variables: dhclient/options/ddns +Variables: dhclient/options/ddns/zone +Variables: dhclient/options/ddns/serverupdate +Variables: dhclient/linklocal/fallback +Variables: hostname +Variables: domainname diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry-variables b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry-variables new file mode 100644 index 0000000..d57d48d --- /dev/null +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-common.univention-config-registry-variables @@ -0,0 +1,35 @@ +[dhclient/options/timeout] +Description[de]=Definiert die Zeit in Sekunden, die der DHCP-Client versucht eine IP-Konfiguration zu beziehen +Description[en]=Defines the amount of time in seconds that the DHCP clients tries to get an IP configuration +Type=int +Categories=system-base + +[dhclient/options/retry] +Description[de]=Definiert die Zeit in Sekunden, die der DHCP-Client vor einem erneuten Versuch wartet +Description[en]=Defines the amount of time in seconds that the DHCP clients waits before trying again +Type=int +Categories=system-base + +[dhclient/linklocal/fallback] +Description[de]=Definiert ob eine Link Local IP Adresse konfiguriert wird, wenn per DHCP keine IP Adresse bezogen werden konnte (Default: true) +Description[en]=Defines whether a link local IP address is configured if no IP address could be obtained via DHCP (default: true) +Type=str +Categories=system-base + +[dhclient/options/ddns] +Description[de]=Aktiviert DDNS per DHCP für externe DNS-Dienste [disabled] +Description[en]=Activates DDNS via DHCP for external DNS-Services [disabled] +Type=bool +Categories=system-base + +[dhclient/options/ddns/zone] +Description[de]=Definiert die DNS Zone, die bei aktiviertem DDNS per DHCP verwendet werden soll [domainname] +Description[en]=Defines the DNS Zone which will be updated when DDNS via DHCP is enabled [domainname] +Type=str +Categories=system-base + +[dhclient/options/ddns/serverupdate] +Description[de]=Ersucht den DHCP-Server den A-Record in der Forward-Zone zu aktualisieren (Standard: yes) +Description[en]=Request DHCP server to update the A record in the forward zone (default: yes) +Type=bool +Categories=system-base diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.install b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.install index 45355da..e079336 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.install +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.install @@ -1,5 +1 @@ -etc/network/ucs-network-tools etc/network/ -etc/network/if-up.d/[0-9]* etc/network/if-up.d/ -etc/network/if-down.d/[0-9]* etc/network/if-down.d/ -etc/network/if-pre-up.d/[0-9]* etc/network/if-pre-up.d/ nm-dhcp-client.action usr/lib/NetworkManager/ diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry index 2366880..4c32445 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry @@ -3,16 +3,5 @@ File: etc/dbus-1/system.d/ucs-networkmanager.conf Variables: networkmanager/group Type: file -File: etc/dhcp/dhclient.conf -Variables: dhclient/options/timeout -Variables: dhclient/options/retry -Variables: dhclient/options/ddns -Variables: dhclient/options/ddns/zone -Variables: dhclient/options/ddns/serverupdate -Variables: dhclient/linklocal/fallback -Variables: hostname -Variables: domainname - -Type: file File: etc/NetworkManager/nm-system-settings.conf Variables: networkmanager/all_interfaces diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry-variables b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry-variables index 8b5b951..d8f8f6b 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry-variables +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-network-manager.univention-config-registry-variables @@ -15,39 +15,3 @@ Description[de]=Ist diese Variable gesetzt, dann wird versucht die Heimatverzeic Description[en]=If this variable is set the home directory share will be mounted via NFS if possible Type=bool Categories=system-base - -[dhclient/options/timeout] -Description[de]=Definiert die Zeit in Sekunden, die der DHCP-Client versucht eine IP-Konfiguration zu beziehen -Description[en]=Defines the amount of time in seconds that the DHCP clients tries to get an IP configuration -Type=int -Categories=system-base - -[dhclient/options/retry] -Description[de]=Definiert die Zeit in Sekunden, die der DHCP-Client vor einem erneuten Versuch wartet -Description[en]=Defines the amount of time in seconds that the DHCP clients waits before trying again -Type=int -Categories=system-base - -[dhclient/linklocal/fallback] -Description[de]=Definiert ob eine Link Local IP Adresse konfiguriert wird, wenn per DHCP keine IP Adresse bezogen werden konnte (Default: true) -Description[en]=Defines whether a link local IP address is configured if no IP address could be obtained via DHCP (default: true) -Type=str -Categories=system-base - -[dhclient/options/ddns] -Description[de]=Aktiviert DDNS per DHCP für externe DNS-Dienste [disabled] -Description[en]=Activates DDNS via DHCP for external DNS-Services [disabled] -Type=bool -Categories=system-base - -[dhclient/options/ddns/zone] -Description[de]=Definiert die DNS Zone, die bei aktiviertem DDNS per DHCP verwendet werden soll [domainname] -Description[en]=Defines the DNS Zone which will be updated when DDNS via DHCP is enabled [domainname] -Type=str -Categories=system-base - -[dhclient/options/ddns/serverupdate] -Description[de]=Ersucht den DHCP-Server den A-Record in der Forward-Zone zu aktualisieren (Standard: yes) -Description[en]=Request DHCP server to update the A record in the forward zone (default: yes) -Type=bool -Categories=system-base diff --git a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.preinst b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.preinst index ce2d24f..6d94cbf 100644 --- a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.preinst +++ b/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.preinst @@ -1,9 +1,9 @@ #! /bin/sh # # Univention DHCP -# ppreinst script +# preinst script # -# Copyright 2004-2011 Univention GmbH +# Copyright 2004-2012 Univention GmbH # # http://www.univention.de/ # -- 1.7.1 From 89fd3f92b42ef2ecad02c948efdebcda017c5675 Mon Sep 17 00:00:00 2001 Message-Id: <89fd3f92b42ef2ecad02c948efdebcda017c5675.1341467633.git.hahn@univention.de> In-Reply-To: References: From: Philipp Hahn Date: Wed, 4 Jul 2012 21:38:02 +0200 Subject: [PATCH 4/7] Bug #27829: Transition from /etc/dhcp3/ to /etc/dhcp/ Organization: Univention GmbH, Bremen, Germany UCS-3.0 uses isc-dhcp-4, which uses /etc/dhcp/ instead of /etc/dhcp3/. Move the remaining scripts over and try to remove the old directories. --- .../univention-network-manager/debian/changelog | 1 + .../base/univention-network-manager/debian/control | 1 + .../base/univention-network-manager/debian/rules | 2 +- .../debian/univention-ifplugd.dirs | 8 ++-- .../debian/univention-ifplugd.install | 2 +- .../debian/univention-ifplugd.postinst | 13 ++++++ .../debian/univention-ifplugd.preinst | 45 ++++++++++++++++++++ .../univention-ifplugd-enter-hook | 2 +- 8 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.preinst diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog index 6fb7767..810db90 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog @@ -1,6 +1,7 @@ univention-network-manager (3.0.23-1) unstable; urgency=low * Move common data to univention-network-common (Bug #24282) + * Transition from /etc/dhcp3/ to /etc/dhcp/ (Bug #27829) -- Philipp Hahn Wed, 04 Jul 2012 20:29:33 +0200 diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control index 0c967c8..2081749 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control @@ -26,6 +26,7 @@ Package: univention-ifplugd Architecture: all Conflicts: network-manager, univention-network-manager +Pre-Depends: dpkg (>= 1.15.7.2) Depends: ${misc:Depends}, univention-network-common, ifplugd, diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules index 4886ac1..ad58e71 100755 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/rules @@ -38,7 +38,7 @@ override_dh_fixperms: dh_fixperms chmod 755 debian/univention-network-manager/usr/lib/NetworkManager/nm-dhcp-client.action chmod 755 debian/univention-network-common/etc/network/if-pre-up.d/10_dhclientconf - chmod 755 debian/univention-ifplugd/etc/dhcp3/dhclient-enter-hooks.d/univention-ifplugd-enter-hook + chmod 755 debian/univention-ifplugd/etc/dhcp/dhclient-enter-hooks.d/univention-ifplugd-enter-hook override_dh_installinit: dh_installinit -punivention-network-common --no-start -u"defaults 99" diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.dirs b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.dirs index 6aea008..953d0f6 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.dirs +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.dirs @@ -1,4 +1,4 @@ -etc/network/if-up.d/ -etc/network/if-down.d/ -etc/dhcp3/dhclient-enter-hooks.d -etc/dhcp3/dhclient-enter-hooks.univention.d +etc/network/if-up.d +etc/network/if-down.d +etc/dhcp/dhclient-enter-hooks.d +etc/dhcp/dhclient-enter-hooks.univention.d diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install index 6deeb20..d90ea77 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.install @@ -1 +1 @@ -univention-ifplugd-enter-hook etc/dhcp3/dhclient-enter-hooks.d/ +univention-ifplugd-enter-hook etc/dhcp/dhclient-enter-hooks.d/ diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst index eb25797..0cf76a0 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst @@ -67,4 +67,17 @@ if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt 3.0.18-1 fi fi +# Transition from /etc/dhcp3/ to /etc/dhcp/ +dpkg-maintscript-helper mv_conffile \ + "/etc/dhcp3/dhclient-enter-hooks.d/univention-ifplugd-enter-hook" \ + "/etc/dhcp/dhclient-enter-hooks.d/univention-ifplugd-enter-hook" \ + 3.0.23~ univention-ifplugd -- "$@" +dpkg-maintscript-helper rm_conffile \ + "/etc/dhcp3/dhclient-enter-hooks.univention.d/00_fallback.py" \ + 3.0.23~ univention-ifplugd -- "$@" +if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt 3.0.23~; +then + rmdir -p /etc/dhcp3/dhclient-enter-hooks.d /etc/dhcp3/dhclient-enter-hooks.univention.d 2>/dev/null || true +fi + exit 0 diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.preinst b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.preinst new file mode 100644 index 0000000..17cdc1e --- /dev/null +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.preinst @@ -0,0 +1,45 @@ +#! /bin/sh +# +# Univention Network ifplugd +# preinst script +# +# Copyright 2004-2012 Univention GmbH +# +# http://www.univention.de/ +# +# All rights reserved. +# +# The source code of this program is made available +# under the terms of the GNU Affero General Public License version 3 +# (GNU AGPL V3) as published by the Free Software Foundation. +# +# Binary versions of this program provided by Univention to you as +# well as other copyrighted, protected or trademarked materials like +# Logos, graphics, fonts, specific documentations and configurations, +# cryptographic keys etc. are subject to a license agreement between +# you and Univention and not subject to the GNU AGPL V3. +# +# In the case you use this program under the terms of the GNU AGPL V3, +# the program is provided in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License with the Debian GNU/Linux or Univention distribution in file +# /usr/share/common-licenses/AGPL-3; if not, see +# . + +set -e + +#DEBHELPER# + +dpkg-maintscript-helper mv_conffile \ + "/etc/dhcp3/dhclient-enter-hooks.d/univention-ifplugd-enter-hook" \ + "/etc/dhcp/dhclient-enter-hooks.d/univention-ifplugd-enter-hook" \ + 3.0.23~ univention-ifplugd -- "$@" +dpkg-maintscript-helper rm_conffile \ + "/etc/dhcp3/dhclient-enter-hooks.univention.d/00_fallback.py" \ + 3.0.23~ univention-ifplugd -- "$@" + +exit 0 diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook b/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook index ac079dc..9a3c373 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook @@ -30,7 +30,7 @@ # /usr/share/common-licenses/AGPL-3; if not, see # . -HOOKS_DIR=/etc/dhcp3/dhclient-enter-hooks.univention.d/ +HOOKS_DIR=/etc/dhcp/dhclient-enter-hooks.univention.d/ # debugging set | egrep '(new_|old_|reason)' > /tmp/ifplugd-env-old -- 1.7.1 From 79d0fc1f3ad217cee12d242215ca005760a057d1 Mon Sep 17 00:00:00 2001 Message-Id: <79d0fc1f3ad217cee12d242215ca005760a057d1.1341467633.git.hahn@univention.de> In-Reply-To: References: From: Philipp Hahn Date: Wed, 4 Jul 2012 21:40:05 +0200 Subject: [PATCH 5/7] Bug #27829: Update /etc/dhcp/dhclient.conf template Organization: Univention GmbH, Bremen, Germany Update from lates Debian file and add domain-search, ntp-servers, rfc3442-classless-static-routes. --- .../conffiles/etc/dhcp/dhclient.conf | 7 +++++-- .../univention-network-manager/debian/changelog | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf b/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf index d4934bd..e13879a 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf @@ -13,6 +13,8 @@ # few changes must be made to this file, if any. # +option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; + @!@ if configRegistry.is_true('dhclient/options/ddns', False): print 'send host-name "%s";' % configRegistry.get('hostname', '') @@ -32,8 +34,9 @@ if configRegistry.is_true('dhclient/options/ddns', False): #supersede domain-name "fugue.com home.vix.com"; #prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, host-name, - netbios-name-servers, netbios-scope, interface-mtu; + domain-name, domain-name-servers, domain-search, host-name, + netbios-name-servers, netbios-scope, interface-mtu, + rfc3442-classless-static-routes, ntp-servers; #require subnet-mask, domain-name-servers; @!@ print 'timeout %s;' % configRegistry.get( 'dhclient/options/timeout', '30' ) diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog index 810db90..50aac4d 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog @@ -2,6 +2,7 @@ univention-network-manager (3.0.23-1) unstable; urgency=low * Move common data to univention-network-common (Bug #24282) * Transition from /etc/dhcp3/ to /etc/dhcp/ (Bug #27829) + * Update /etc/dhcp/dhclient.conf template from lates Debian file. -- Philipp Hahn Wed, 04 Jul 2012 20:29:33 +0200 -- 1.7.1 From 71d7e73dbe37a6037e9c4df68c01fe7b099e8438 Mon Sep 17 00:00:00 2001 Message-Id: <71d7e73dbe37a6037e9c4df68c01fe7b099e8438.1341467633.git.hahn@univention.de> In-Reply-To: References: From: Philipp Hahn Date: Wed, 4 Jul 2012 21:42:26 +0200 Subject: [PATCH 6/7] Bug #27829: Move debug files to /var/run/ Organization: Univention GmbH, Bremen, Germany Logging to the fixes files /tmp/ifplugd-env-* and /tmp/nm-env is prone to symlink attacks. Move those files to /var/run/ instead. --- .../univention-network-manager/debian/changelog | 1 + .../nm-dhcp-client.action | 6 ++---- .../univention-ifplugd-enter-hook | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog index 50aac4d..fd093e4 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/changelog @@ -3,6 +3,7 @@ univention-network-manager (3.0.23-1) unstable; urgency=low * Move common data to univention-network-common (Bug #24282) * Transition from /etc/dhcp3/ to /etc/dhcp/ (Bug #27829) * Update /etc/dhcp/dhclient.conf template from lates Debian file. + * Move debug files to /var/run/ to prevent symlink attack. -- Philipp Hahn Wed, 04 Jul 2012 20:29:33 +0200 diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/nm-dhcp-client.action b/branches/ucs-3.0/ucs/base/univention-network-manager/nm-dhcp-client.action index 4a9d16a..202a8b2 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/nm-dhcp-client.action +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/nm-dhcp-client.action @@ -42,10 +42,8 @@ for script in $(find ${HOOKS_DIR} -type f -name "*.py" -o -name "*.sh"); do done # debugging -set | egrep '(new_|old_|reason)' > /tmp/nm-env - +env | egrep '(new_|old_|reason)' > /var/run/nm-env + /usr/lib/NetworkManager/nm-dhcp-client.action.real exit 0 - - diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook b/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook index 9a3c373..f228a05 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/univention-ifplugd-enter-hook @@ -33,7 +33,7 @@ HOOKS_DIR=/etc/dhcp/dhclient-enter-hooks.univention.d/ # debugging -set | egrep '(new_|old_|reason)' > /tmp/ifplugd-env-old +env | egrep '(new_|old_|reason)' > /var/run/ifplugd-env-old # call hooks: each hook script might write shell script to standard output to change environment variables for script in $(find ${HOOKS_DIR} -type f -name "*.py" -o -name "*.sh"); do @@ -41,4 +41,4 @@ for script in $(find ${HOOKS_DIR} -type f -name "*.py" -o -name "*.sh"); do done # debugging -set | egrep '(new_|old_|reason)' > /tmp/ifplugd-env-new +env | egrep '(new_|old_|reason)' > /var/run/ifplugd-env-new -- 1.7.1 From a6a9a649b6b4aff3325ac6d8ddacaab5edd68316 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Philipp Hahn Date: Wed, 4 Jul 2012 21:44:17 +0200 Subject: [PATCH 7/7] Bug #27829: Miscellaneous cleanups Organization: Univention GmbH, Bremen, Germany Add missing ${python:depends} Remove trailing whitespace. Remove space before tab. Update multiple UCR variables at once. --- .../conffiles/etc/dhcp/dhclient.conf | 8 ++++---- .../base/univention-network-manager/debian/control | 1 + .../debian/univention-ifplugd.postinst | 15 +++++++-------- .../univention-register-network-address | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf b/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf index e13879a..2931d6d 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/conffiles/etc/dhcp/dhclient.conf @@ -23,9 +23,9 @@ if configRegistry.is_true('dhclient/options/ddns', False): else: print 'send fqdn.fqdn "%s.%s";' % (configRegistry.get('hostname', ''), configRegistry.get('domainname', '')) if configRegistry.is_true('dhclient/options/ddns/serverupdate', True): - print 'send fqdn.server-update on;' + print 'send fqdn.server-update on;' else: - print 'send fqdn.server-update off;' + print 'send fqdn.server-update off;' print 'send fqdn.encoded on;' @!@ #send host-name "andare.fugue.com"; @@ -43,7 +43,7 @@ print 'timeout %s;' % configRegistry.get( 'dhclient/options/timeout', '30' ) print 'retry %s;' % configRegistry.get( 'dhclient/options/retry', '60' ) @!@ # reboot + timout should be below the 45 secs that NetworkManager waits before terminating dhclient, otherwise fallback script is not run -reboot 5; +reboot 5; #select-timeout 5; #initial-interval 2; #script "/etc/dhcp3/dhclient-script"; @@ -81,7 +81,7 @@ if configRegistry.is_true('dhclient/linklocal/fallback', True): iface = k.split('/')[1] r1 = random.randrange(0, 255) # 0 to 254 r2 = random.randrange(0, 255) # 0 to 254 - + d = datetime.fromtimestamp(time.time() + (6*3600)) # expire in six hours print 'lease {' diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control index 2081749..1577056 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/control @@ -42,6 +42,7 @@ Description: UCS - Support for ifplugd Package: univention-network-common Architecture: all Depends: ${misc:Depends}, + ${python:Depends}, univention-management-console-server, python-netifaces Replaces: univention-network-manager, diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst index 0cf76a0..9aa0e73 100644 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/debian/univention-ifplugd.postinst @@ -35,17 +35,16 @@ eval "$(univention-config-registry shell)" if [ -z "$ifplugd_action_mount" ]; then - ifplugd_action_mount="yes" + ifplugd_action_mount="yes" fi # set "interfaces/handler" in any case to "ifplugd" -univention-config-registry set interfaces/handler=ifplugd - -univention-config-registry set networkmanager/action/mount?"no" -univention-config-registry set networkmanager/dhcp/options/fallback?"no" - -univention-config-registry set dhclient/options/timeout?"40" -univention-config-registry set dhclient/options/retry?"60" +univention-config-registry set \ + interfaces/handler=ifplugd \ + networkmanager/action/mount?"no" \ + networkmanager/dhcp/options/fallback?"no" \ + dhclient/options/timeout?"40" \ + dhclient/options/retry?"60" for i in $(seq 0 10); do var="interfaces_eth${i}_networkmanager" diff --git a/branches/ucs-3.0/ucs/base/univention-network-manager/univention-register-network-address b/branches/ucs-3.0/ucs/base/univention-network-manager/univention-register-network-address index 4ed3c5a..01a0806 100755 --- a/branches/ucs-3.0/ucs/base/univention-network-manager/univention-register-network-address +++ b/branches/ucs-3.0/ucs/base/univention-network-manager/univention-register-network-address @@ -91,5 +91,5 @@ if __name__ == '__main__': retcode += 1 elif options.verbose: print 'INFO: %s is not configured as dhcp device.' % iface - + sys.exit(retcode) -- 1.7.1