20 commits - ucs/conffiles ucs/debian ucs/kolab-imap-join-script.sh ucs/kolab-imap-unjoin-script.sh ucs/kolab-mta-join-script.sh ucs/kolab-mta-unjoin-script.sh ucs/kolab-ucs-hookKolabEnabled.py ucs/kolab-ucs-join-script.sh ucs/kolab-ucs-unjoin-script.sh ucs/kolab-webclient-join-script.sh ucs/kolab-webclient-passwd-change.sh ucs/kolab-webclient-unjoin-script.sh

Christoph Wickert wickert at kolabsys.com
Tue Apr 7 20:51:06 CEST 2015


 ucs/conffiles/etc/roundcubemail/config.inc.php |    2 
 ucs/debian/kolab-imap.dirs                     |    1 
 ucs/debian/kolab-imap.install                  |    1 
 ucs/debian/kolab-imap.postinst                 |    4 
 ucs/debian/kolab-imap.postrm                   |   11 ++
 ucs/debian/kolab-imap.prerm                    |    2 
 ucs/debian/kolab-mta.dirs                      |    1 
 ucs/debian/kolab-mta.install                   |    1 
 ucs/debian/kolab-mta.postinst                  |    6 +
 ucs/debian/kolab-mta.postrm                    |   11 ++
 ucs/debian/kolab-mta.prerm                     |   11 ++
 ucs/debian/kolab-ucs.dirs                      |    2 
 ucs/debian/kolab-ucs.install                   |    2 
 ucs/debian/kolab-ucs.postinst                  |   78 ++++++++++-------
 ucs/debian/kolab-ucs.postrm                    |   11 ++
 ucs/debian/kolab-ucs.prerm                     |   11 ++
 ucs/debian/kolab-webclient.dirs                |    2 
 ucs/debian/kolab-webclient.install             |    1 
 ucs/debian/kolab-webclient.postinst            |    6 +
 ucs/debian/kolab-webclient.postrm              |   11 ++
 ucs/debian/kolab-webclient.prerm               |   11 ++
 ucs/kolab-imap-join-script.sh                  |   30 ++++++
 ucs/kolab-imap-unjoin-script.sh                |   59 +++++++++++++
 ucs/kolab-mta-join-script.sh                   |    4 
 ucs/kolab-mta-unjoin-script.sh                 |   55 ++++++++++++
 ucs/kolab-ucs-hookKolabEnabled.py              |  110 +++++++++++++++++++++++++
 ucs/kolab-ucs-join-script.sh                   |   37 +++++++-
 ucs/kolab-ucs-unjoin-script.sh                 |   71 ++++++++++++++++
 ucs/kolab-webclient-join-script.sh             |    2 
 ucs/kolab-webclient-passwd-change.sh           |    4 
 ucs/kolab-webclient-unjoin-script.sh           |   50 +++++++++++
 31 files changed, 565 insertions(+), 43 deletions(-)

New commits:
commit 54c9b7e61e9f64ea25f24d48e5ece09a63a66f6b
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Apr 7 18:51:47 2015 +0200

    Fix order of removing unjoin and calling join scripts (#4351)

diff --git a/ucs/debian/kolab-imap.postinst b/ucs/debian/kolab-imap.postinst
index 0b2d2d5..8b3ab62 100755
--- a/ucs/debian/kolab-imap.postinst
+++ b/ucs/debian/kolab-imap.postinst
@@ -41,6 +41,10 @@ case $1 in
             fi
         fi
 
+        # remove unjoin script if present
+        uinst=/usr/lib/univention-install/81kolab-imap.uinst
+        [ -e "$uinst" ] && rm "$uinst"
+
         # run join script
         call_joinscript 81kolab-imap.inst
 
@@ -67,10 +71,6 @@ case $1 in
 
         dpkg-statoverride --update --add listener nogroup 775 /var/lib/kolab
 
-        # remove unjoin script if present
-        uinst=/usr/lib/univention-install/81kolab-imap.uinst
-        [ -e "$uinst" ] && rm "$uinst"
-
     ;;
 esac
 
diff --git a/ucs/debian/kolab-mta.postinst b/ucs/debian/kolab-mta.postinst
index 31debad..c3ec2e0 100755
--- a/ucs/debian/kolab-mta.postinst
+++ b/ucs/debian/kolab-mta.postinst
@@ -117,6 +117,12 @@ if [ -x /etc/init.d/saslauthd ]; then
         /etc/init.d/saslauthd stop || true
 fi
 
+# remove unjoin script if present
+if [ "$1" = "configure" ]; then
+	uinst=/usr/lib/univention-install/67kolab-mta.uinst
+	[ -e "$uinst" ] && rm "$uinst"
+fi
+
 # Run join script
 call_joinscript 67kolab-mta.inst
 
@@ -137,8 +143,4 @@ ucr set security/packetfilter/package/kolab-mta/tcp/25/all="ACCEPT" \
 	security/packetfilter/package/kolab-mta/tcp/587/all/en="Submission"
 [ -x "/etc/init.d/univention-firewall" ] && invoke-rc.d univention-firewall restart
 
-# remove unjoin script if present
-	uinst=/usr/lib/univention-install/67kolab-mta.uinst
-	[ -e "$uinst" ] && rm "$uinst"
-
 exit 0
diff --git a/ucs/debian/kolab-webclient.postinst b/ucs/debian/kolab-webclient.postinst
index de21177..f02d5d7 100755
--- a/ucs/debian/kolab-webclient.postinst
+++ b/ucs/debian/kolab-webclient.postinst
@@ -39,13 +39,13 @@ univention-config-registry set \
 	mail/roundcube/smtp/port?587 \
 	mail/roundcube/smtp/server?tls://localhost
 
-# call the join script
-call_joinscript 85kolab-webclient.inst
-
 # remove unjoin script if present
 if [ "$1" = "configure" ]; then
 	uinst=/usr/lib/univention-install/85kolab-webclient.uinst
 	[ -e "$uinst" ] && rm "$uinst"
 fi
 
+# call the join script
+call_joinscript 85kolab-webclient.inst
+
 exit 0


commit e92aeeeef022613c6f73a23324b554c4a480a183
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Apr 7 18:40:09 2015 +0200

    Fix syntax error in some postrm scripts (#4351)

diff --git a/ucs/debian/kolab-imap.postrm b/ucs/debian/kolab-imap.postrm
index 3ba6a51..cf9c128 100755
--- a/ucs/debian/kolab-imap.postrm
+++ b/ucs/debian/kolab-imap.postrm
@@ -4,9 +4,8 @@
 
 case "$1" in
 	remove)
-		# This package is being purged. Clean up.
 		. /usr/share/univention-lib/all.sh
 		call_unjoinscript 81kolab-imap.uinst
-fi
+
 	;;
 esac
diff --git a/ucs/debian/kolab-mta.postrm b/ucs/debian/kolab-mta.postrm
index 66f8694..73205f2 100755
--- a/ucs/debian/kolab-mta.postrm
+++ b/ucs/debian/kolab-mta.postrm
@@ -4,9 +4,8 @@
 
 case "$1" in
 	remove)
-		# This package is being purged. Clean up.
 		. /usr/share/univention-lib/all.sh
 		call_unjoinscript 67kolab-mta.uinst
-fi
+
 	;;
 esac
diff --git a/ucs/debian/kolab-webclient.postrm b/ucs/debian/kolab-webclient.postrm
index 1493a16..d41ce23 100755
--- a/ucs/debian/kolab-webclient.postrm
+++ b/ucs/debian/kolab-webclient.postrm
@@ -4,9 +4,8 @@
 
 case "$1" in
 	remove)
-		# This package is being purged. Clean up.
 		. /usr/share/univention-lib/all.sh
 		call_unjoinscript 85kolab-webclient.uinst
-fi
+
 	;;
 esac


commit 972745d0d52e89a6265cee3cd7f873e2b31a4c7b
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Apr 7 18:37:50 2015 +0200

    Fix permission of some of the postrm and prerm files (#4351)

diff --git a/ucs/debian/kolab-imap.postrm b/ucs/debian/kolab-imap.postrm
old mode 100644
new mode 100755
diff --git a/ucs/debian/kolab-mta.postrm b/ucs/debian/kolab-mta.postrm
old mode 100644
new mode 100755
diff --git a/ucs/debian/kolab-mta.prerm b/ucs/debian/kolab-mta.prerm
old mode 100644
new mode 100755
diff --git a/ucs/debian/kolab-webclient.postrm b/ucs/debian/kolab-webclient.postrm
old mode 100644
new mode 100755
diff --git a/ucs/debian/kolab-webclient.prerm b/ucs/debian/kolab-webclient.prerm
old mode 100644
new mode 100755


commit d4d51f45d28455b23227f911f8e69a46469abeac
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Apr 7 18:36:25 2015 +0200

    Add kolab-ucs unjoin script (#4964)

diff --git a/ucs/debian/kolab-ucs.dirs b/ucs/debian/kolab-ucs.dirs
index b3074f9..d7d4a92 100644
--- a/ucs/debian/kolab-ucs.dirs
+++ b/ucs/debian/kolab-ucs.dirs
@@ -1,3 +1,4 @@
 usr/lib/univention-install/
+usr/lib/univention-uninstall/
 usr/share/doc/kolab-schema/
 usr/share/kolab-ucs/
diff --git a/ucs/debian/kolab-ucs.install b/ucs/debian/kolab-ucs.install
index e839c18..cc0ee82 100644
--- a/ucs/debian/kolab-ucs.install
+++ b/ucs/debian/kolab-ucs.install
@@ -1,3 +1,4 @@
 65kolab-ucs.inst /usr/lib/univention-install
+65kolab-ucs.uinst /usr/lib/univention-uninstall
 univention-kolab3.acl /usr/share/doc/kolab-schema
 hookKolabEnabled.py /usr/share/kolab-ucs
diff --git a/ucs/debian/kolab-ucs.postinst b/ucs/debian/kolab-ucs.postinst
index 610d5a5..6e9de4c 100755
--- a/ucs/debian/kolab-ucs.postinst
+++ b/ucs/debian/kolab-ucs.postinst
@@ -33,39 +33,49 @@
 
 #DEBHELPER#
 
-. /usr/share/univention-lib/all.sh
-
-eval "$(ucr shell)"
-
-ucr set mail/antivir/spam?yes
-if [ "$1" = configure -a -n "$2" ] && dpkg --compare-versions "$2" lt 0.1-10; then
-	ucr set mail/cyrus/caluser?kolab2cal@$domainname
-	ucr set mail/cyrus/caluser/pwdfile?/etc/kolab2cal.secret
-elif [ -z "$2" ]; then
-	ucr set mail/cyrus/caluser?kolab2cal@$domainname
-	ucr set mail/cyrus/caluser/pwdfile?/etc/kolab2cal.secret
-fi
-
-if [ ! -e "/etc/cyrus.secret" ]; then
-    touch /etc/cyrus.secret
-    chmod 600 /etc/cyrus.secret
-    chown cyrus:root /etc/cyrus.secret
-    makepasswd --nocrypt > /etc/cyrus.secret
-fi
-
-call_joinscript 65kolab-ucs.inst
-
-ucr commit /etc/apt/preferences.d/kolab.pref
-ucr commit /etc/apt/sources.list.d/kolab.list
-
-if [ -x /etc/init.d/univention-directory-listener ]; then
-	/etc/init.d/univention-directory-listener restart
-fi
-
-if [ -z "$postfix_autostart" ] || [ "$postfix_autostart" = "yes" ]; then
-	if [ -x /etc/init.d/postfix ]; then
-	    /etc/init.d/postfix restart
-	fi
-fi
+case $1 in
+    configure)
+        . /usr/share/univention-lib/all.sh
+        
+        eval "$(ucr shell)"
+        
+        ucr set mail/antivir/spam?yes
+        if [ "$1" = configure -a -n "$2" ] && dpkg --compare-versions "$2" lt 0.1-10; then
+            ucr set mail/cyrus/caluser?kolab2cal@$domainname
+            ucr set mail/cyrus/caluser/pwdfile?/etc/kolab2cal.secret
+        elif [ -z "$2" ]; then
+            ucr set mail/cyrus/caluser?kolab2cal@$domainname
+            ucr set mail/cyrus/caluser/pwdfile?/etc/kolab2cal.secret
+        fi
+        
+        if [ ! -e "/etc/cyrus.secret" ]; then
+            touch /etc/cyrus.secret
+            chmod 600 /etc/cyrus.secret
+            chown cyrus:root /etc/cyrus.secret
+            makepasswd --nocrypt > /etc/cyrus.secret
+        fi
+        
+        # remove unjoin script if present
+        uinst=/usr/lib/univention-install/65kolab-ucs.inst
+        [ -e "$uinst" ] && rm "$uinst"
+        
+        # call join script
+        call_joinscript 65kolab-ucs.inst
+        
+        ucr commit /etc/apt/preferences.d/kolab.pref
+        ucr commit /etc/apt/sources.list.d/kolab.list
+        
+        if [ -x /etc/init.d/univention-directory-listener ]; then
+            /etc/init.d/univention-directory-listener restart
+        fi
+        
+        if [ -z "$postfix_autostart" ] || [ "$postfix_autostart" = "yes" ]; then
+            if [ -x /etc/init.d/postfix ]; then
+                /etc/init.d/postfix restart
+            fi
+        fi
+   
+    ;;
+esac
 
 exit 0
diff --git a/ucs/debian/kolab-ucs.postrm b/ucs/debian/kolab-ucs.postrm
new file mode 100755
index 0000000..495ad2f
--- /dev/null
+++ b/ucs/debian/kolab-ucs.postrm
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		. /usr/share/univention-lib/all.sh
+		call_unjoinscript 65kolab-ucs.uinst
+
+	;;
+esac
diff --git a/ucs/debian/kolab-ucs.prerm b/ucs/debian/kolab-ucs.prerm
new file mode 100755
index 0000000..007622d
--- /dev/null
+++ b/ucs/debian/kolab-ucs.prerm
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		cp /usr/lib/univention-uninstall/65kolab-ucs.uinst \
+			/usr/lib/univention-install/
+
+	;;
+esac
diff --git a/ucs/kolab-ucs-unjoin-script.sh b/ucs/kolab-ucs-unjoin-script.sh
new file mode 100755
index 0000000..9d31eeb
--- /dev/null
+++ b/ucs/kolab-ucs-unjoin-script.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Kolab Systems UCS Groupware Server
+#  unjoin script
+#
+# Copyright 2015 Kolab Systems AG
+#
+# http://www.kolabsystems.com/
+#
+# 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
+# <http://www.gnu.org/licenses/>.
+
+VERSION=1
+. /usr/share/univention-join/joinscripthelper.lib
+joinscript_init
+
+SERVICE="kolab"
+
+eval "$(ucr shell)"
+
+# remove extented attributes
+for ATTRIBUTE in \
+	KolabForwardAddress \
+	KolabForwardActive \
+	KolabForwardKeepCopy \
+	KolabForwardUCE \
+	KolabVacationText \
+	KolabVacationActive \
+	KolabVacationAddress \
+	KolabVacationNoReactDomain \
+	KolabDeliveryToFolderName \
+	KolabDeliveryToFolderActive ; \
+do udm settings/extended_attribute remove \
+	--dn "cn=$ATTRIBUTE,cn=custom attributes,cn=univention,$ldap_base" ; done
+
+udm settings/extended_attribute remove \
+	--dn "cn=KolabEnabled,cn=custom attributes,cn=univention,$ldap_base"
+
+# Remove user template
+udm settings/usertemplate remove \
+	--dn "cn=$domainname Groupware Account,cn=templates,cn=univention,${ldap_base}"
+
+# remove service from my host object
+ucs_removeServiceFromLocalhost "kolab" "$@" || die
+
+# do NOT call "joinscript_save_current_version"
+# otherwise an entry will be appended to /var/univenion-join/status
+# instead the join script needs to be removed from the status file
+joinscript_remove_script_from_status_file kolab-ucs
+
+exit 0


commit 8a9b3c2ad12e0e32abb99051ab5bc2120a0b882e
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Thu Apr 2 18:46:17 2015 +0200

    Fix comment in kolab-webclient-unjoin-script

diff --git a/ucs/kolab-webclient-unjoin-script.sh b/ucs/kolab-webclient-unjoin-script.sh
index b3e3520..fca7e77 100755
--- a/ucs/kolab-webclient-unjoin-script.sh
+++ b/ucs/kolab-webclient-unjoin-script.sh
@@ -32,7 +32,7 @@ eval "$(univention-config-registry shell)"
 
 apache_reload=0
 
-# Register the webclient on UCS landing page
+# De-register the webclient on UCS landing page
 ucr unset \
     ucs/web/overview/entries/service/kolab-webclient/icon \
     ucs/web/overview/entries/service/kolab-webclient/link \


commit 8c76b9f42d9052660f759e57ec2eaab2c515ca67
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Thu Apr 2 18:45:47 2015 +0200

    Don't run a2dissite for kolab-freebusy, chwala and iRony but do it in the individual packages

diff --git a/ucs/kolab-webclient-unjoin-script.sh b/ucs/kolab-webclient-unjoin-script.sh
index 87b2289..b3e3520 100755
--- a/ucs/kolab-webclient-unjoin-script.sh
+++ b/ucs/kolab-webclient-unjoin-script.sh
@@ -32,31 +32,6 @@ eval "$(univention-config-registry shell)"
 
 apache_reload=0
 
-# Disable Kolab Free/Busy site
-if [ -e "/etc/apache2/sites-available/kolab-freebusy" -a ! -e "/etc/apache2/sites-enabled/kolab-freebusy" ]; then
-    echo "Disabling kolab-freebusy"
-    a2dissite kolab-freebusy >/dev/null 2>&1
-    apache_reload=1
-fi
-
-# Disable chwala site
-if [ -e "/etc/apache2/sites-available/chwala" -a ! -e "/etc/apache2/sites-enabled/chwala" ]; then
-    echo "Disabling chwala"
-    a2dissite chwala >/dev/null 2>&1
-    apache_reload=1
-fi
-
-# Disable iRony site
-if [ -e "/etc/apache2/sites-available/iRony" -a ! -e "/etc/apache2/sites-enabled/iRony" ]; then
-    echo "Disabling iRony"
-    a2dissite iRony >/dev/null 2>&1
-    apache_reload=1
-fi
-
-if [ ${apache_reload} -eq 1 ]; then
-    invoke-rc.d apache2 reload
-fi
-
 # Register the webclient on UCS landing page
 ucr unset \
     ucs/web/overview/entries/service/kolab-webclient/icon \


commit 873f2f9271764f09997fe9f9d5593396468dbb24
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Mar 31 15:53:26 2015 +0200

    Call all uninstall scripts (#4351)

diff --git a/ucs/debian/kolab-imap.postinst b/ucs/debian/kolab-imap.postinst
index ed04691..0b2d2d5 100755
--- a/ucs/debian/kolab-imap.postinst
+++ b/ucs/debian/kolab-imap.postinst
@@ -67,6 +67,10 @@ case $1 in
 
         dpkg-statoverride --update --add listener nogroup 775 /var/lib/kolab
 
+        # remove unjoin script if present
+        uinst=/usr/lib/univention-install/81kolab-imap.uinst
+        [ -e "$uinst" ] && rm "$uinst"
+
     ;;
 esac
 
diff --git a/ucs/debian/kolab-imap.postrm b/ucs/debian/kolab-imap.postrm
new file mode 100644
index 0000000..3ba6a51
--- /dev/null
+++ b/ucs/debian/kolab-imap.postrm
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		# This package is being purged. Clean up.
+		. /usr/share/univention-lib/all.sh
+		call_unjoinscript 81kolab-imap.uinst
+fi
+	;;
+esac
diff --git a/ucs/debian/kolab-imap.prerm b/ucs/debian/kolab-imap.prerm
index a080380..ab0e9c5 100755
--- a/ucs/debian/kolab-imap.prerm
+++ b/ucs/debian/kolab-imap.prerm
@@ -14,5 +14,7 @@ case "$1" in
 		if [ -L /usr/lib/univention-directory-listener/system/kolab.py ]; then
 			rm -rf /usr/lib/univention-directory-listener/system/kolab.py
 		fi
+		cp /usr/lib/univention-uninstall/81kolab-imap.uinst \
+			/usr/lib/univention-install/
 	;;
 esac
diff --git a/ucs/debian/kolab-mta.postinst b/ucs/debian/kolab-mta.postinst
index 514657b..31debad 100755
--- a/ucs/debian/kolab-mta.postinst
+++ b/ucs/debian/kolab-mta.postinst
@@ -137,4 +137,8 @@ ucr set security/packetfilter/package/kolab-mta/tcp/25/all="ACCEPT" \
 	security/packetfilter/package/kolab-mta/tcp/587/all/en="Submission"
 [ -x "/etc/init.d/univention-firewall" ] && invoke-rc.d univention-firewall restart
 
+# remove unjoin script if present
+	uinst=/usr/lib/univention-install/67kolab-mta.uinst
+	[ -e "$uinst" ] && rm "$uinst"
+
 exit 0
diff --git a/ucs/debian/kolab-mta.postrm b/ucs/debian/kolab-mta.postrm
new file mode 100644
index 0000000..66f8694
--- /dev/null
+++ b/ucs/debian/kolab-mta.postrm
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		# This package is being purged. Clean up.
+		. /usr/share/univention-lib/all.sh
+		call_unjoinscript 67kolab-mta.uinst
+fi
+	;;
+esac
diff --git a/ucs/debian/kolab-mta.prerm b/ucs/debian/kolab-mta.prerm
new file mode 100644
index 0000000..9c74a41
--- /dev/null
+++ b/ucs/debian/kolab-mta.prerm
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		# This package is being purged. Clean up.
+		cp /usr/lib/univention-uninstall/67kolab-mta.uinst \
+			/usr/lib/univention-install/
+	;;
+esac
diff --git a/ucs/debian/kolab-webclient.postinst b/ucs/debian/kolab-webclient.postinst
index 2d70ebd..de21177 100755
--- a/ucs/debian/kolab-webclient.postinst
+++ b/ucs/debian/kolab-webclient.postinst
@@ -42,4 +42,10 @@ univention-config-registry set \
 # call the join script
 call_joinscript 85kolab-webclient.inst
 
+# remove unjoin script if present
+if [ "$1" = "configure" ]; then
+	uinst=/usr/lib/univention-install/85kolab-webclient.uinst
+	[ -e "$uinst" ] && rm "$uinst"
+fi
+
 exit 0
diff --git a/ucs/debian/kolab-webclient.postrm b/ucs/debian/kolab-webclient.postrm
new file mode 100644
index 0000000..1493a16
--- /dev/null
+++ b/ucs/debian/kolab-webclient.postrm
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		# This package is being purged. Clean up.
+		. /usr/share/univention-lib/all.sh
+		call_unjoinscript 85kolab-webclient.uinst
+fi
+	;;
+esac
diff --git a/ucs/debian/kolab-webclient.prerm b/ucs/debian/kolab-webclient.prerm
new file mode 100644
index 0000000..10713bf
--- /dev/null
+++ b/ucs/debian/kolab-webclient.prerm
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+#DEBHELPER#
+
+case "$1" in
+	remove)
+		# This package is being purged. Clean up.
+		cp /usr/lib/univention-uninstall/85kolab-webclient.uinst \
+			/usr/lib/univention-install/
+	;;
+esac


commit d2c4e7e39bd69296598db7dc850001ce6c7d9515
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Mar 31 15:15:42 2015 +0200

    Fix install location of unjoin scripts (#4351)

diff --git a/ucs/debian/kolab-imap.dirs b/ucs/debian/kolab-imap.dirs
index 55da0ad..9595984 100644
--- a/ucs/debian/kolab-imap.dirs
+++ b/ucs/debian/kolab-imap.dirs
@@ -1,6 +1,7 @@
 usr/sbin
 usr/lib/univention-directory-listener/system
 usr/lib/univention-install
+usr/lib/univention-uninstall
 usr/lib/univention-server
 usr/lib/univention-server/server_password_change.d
 etc/imapd
diff --git a/ucs/debian/kolab-imap.install b/ucs/debian/kolab-imap.install
index ebbc439..ed0f593 100644
--- a/ucs/debian/kolab-imap.install
+++ b/ucs/debian/kolab-imap.install
@@ -1,3 +1,3 @@
 81kolab-imap.inst usr/lib/univention-install/
-81kolab-imap.uinst usr/lib/univention-install/
+81kolab-imap.uinst usr/lib/univention-uninstall/
 kolab-imap usr/lib/univention-server/server_password_change.d/
diff --git a/ucs/debian/kolab-mta.dirs b/ucs/debian/kolab-mta.dirs
index 102fe3f..42263ac 100644
--- a/ucs/debian/kolab-mta.dirs
+++ b/ucs/debian/kolab-mta.dirs
@@ -1,2 +1,3 @@
 usr/lib/univention-install/
+usr/lib/univention-uninstall/
 usr/lib/univention-server/server_password_change.d
diff --git a/ucs/debian/kolab-mta.install b/ucs/debian/kolab-mta.install
index a9aa93e..c28d4a1 100644
--- a/ucs/debian/kolab-mta.install
+++ b/ucs/debian/kolab-mta.install
@@ -1,4 +1,4 @@
 67kolab-mta.inst /usr/lib/univention-install
-67kolab-mta.uinst /usr/lib/univention-install
+67kolab-mta.uinst /usr/lib/univention-uninstall
 kolab-mta usr/lib/univention-server/server_password_change.d/
 
diff --git a/ucs/debian/kolab-webclient.dirs b/ucs/debian/kolab-webclient.dirs
index 622cde9..f08dabd 100644
--- a/ucs/debian/kolab-webclient.dirs
+++ b/ucs/debian/kolab-webclient.dirs
@@ -1,3 +1,5 @@
+usr/lib/univention-install/
+usr/lib/univention-uninstall/
 usr/lib/univention-server
 usr/lib/univention-server/server_password_change.d
 usr/share/roundcubemail
diff --git a/ucs/debian/kolab-webclient.install b/ucs/debian/kolab-webclient.install
index 6cb639f..20bb04c 100644
--- a/ucs/debian/kolab-webclient.install
+++ b/ucs/debian/kolab-webclient.install
@@ -1,4 +1,4 @@
 85kolab-webclient.inst usr/lib/univention-install/
-85kolab-webclient.uinst usr/lib/univention-install/
+85kolab-webclient.uinst usr/lib/univention-uninstall/
 kolab-ucs-logo.svg usr/share/roundcubemail/skins/enterprise/images/
 kolab-webclient usr/lib/univention-server/server_password_change.d/


commit 7753dd5c452635b94211e243f4a1f12e837be1fd
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Fri Mar 27 16:23:42 2015 +0100

    Add kolab-webclient unjoin script (#4351)

diff --git a/ucs/debian/kolab-webclient.install b/ucs/debian/kolab-webclient.install
index 8547b7e..6cb639f 100644
--- a/ucs/debian/kolab-webclient.install
+++ b/ucs/debian/kolab-webclient.install
@@ -1,3 +1,4 @@
 85kolab-webclient.inst usr/lib/univention-install/
+85kolab-webclient.uinst usr/lib/univention-install/
 kolab-ucs-logo.svg usr/share/roundcubemail/skins/enterprise/images/
 kolab-webclient usr/lib/univention-server/server_password_change.d/
diff --git a/ucs/kolab-webclient-unjoin-script.sh b/ucs/kolab-webclient-unjoin-script.sh
new file mode 100755
index 0000000..87b2289
--- /dev/null
+++ b/ucs/kolab-webclient-unjoin-script.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+#
+# Kolab Webclient unjoin script
+#
+# Copyright (C) 2015 Kolab Systems AG <contact at kolabsystems.com>
+#
+# http://kolabsystems.com/
+#
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3 as
+# published by the Free Software Foundation
+#
+# This program is distributed 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+VERSION=1
+
+. /usr/share/univention-lib/all.sh
+. /usr/share/univention-join/joinscripthelper.lib
+
+joinscript_init
+
+eval "$(univention-config-registry shell)"
+
+apache_reload=0
+
+# Disable Kolab Free/Busy site
+if [ -e "/etc/apache2/sites-available/kolab-freebusy" -a ! -e "/etc/apache2/sites-enabled/kolab-freebusy" ]; then
+    echo "Disabling kolab-freebusy"
+    a2dissite kolab-freebusy >/dev/null 2>&1
+    apache_reload=1
+fi
+
+# Disable chwala site
+if [ -e "/etc/apache2/sites-available/chwala" -a ! -e "/etc/apache2/sites-enabled/chwala" ]; then
+    echo "Disabling chwala"
+    a2dissite chwala >/dev/null 2>&1
+    apache_reload=1
+fi
+
+# Disable iRony site
+if [ -e "/etc/apache2/sites-available/iRony" -a ! -e "/etc/apache2/sites-enabled/iRony" ]; then
+    echo "Disabling iRony"
+    a2dissite iRony >/dev/null 2>&1
+    apache_reload=1
+fi
+
+if [ ${apache_reload} -eq 1 ]; then
+    invoke-rc.d apache2 reload
+fi
+
+# Register the webclient on UCS landing page
+ucr unset \
+    ucs/web/overview/entries/service/kolab-webclient/icon \
+    ucs/web/overview/entries/service/kolab-webclient/link \
+    ucs/web/overview/entries/service/kolab-webclient/label \
+    ucs/web/overview/entries/service/kolab-webclient/label/de \
+    ucs/web/overview/entries/service/kolab-webclient/description \
+    ucs/web/overview/entries/service/kolab-webclient/description/de
+
+# remove service from my host object
+ucs_removeServiceFromLocalhost "Kolab-Webclient" "$@"
+
+joinscript_remove_script_from_status_file kolab-webclient
+
+exit 0
+


commit d040e38545276c33f7cb0f9a5078c36d5187eca1
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Fri Mar 27 16:22:40 2015 +0100

    Add kolab-mta unjoin script (#4351)

diff --git a/ucs/debian/kolab-mta.install b/ucs/debian/kolab-mta.install
index ad6f345..a9aa93e 100644
--- a/ucs/debian/kolab-mta.install
+++ b/ucs/debian/kolab-mta.install
@@ -1,3 +1,4 @@
 67kolab-mta.inst /usr/lib/univention-install
+67kolab-mta.uinst /usr/lib/univention-install
 kolab-mta usr/lib/univention-server/server_password_change.d/
 
diff --git a/ucs/kolab-mta-unjoin-script.sh b/ucs/kolab-mta-unjoin-script.sh
new file mode 100755
index 0000000..b8530b7
--- /dev/null
+++ b/ucs/kolab-mta-unjoin-script.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Kolab Systems Postfix Mail Server
+#  unjoin script
+#
+# Copyright 2015 Kolab Systems AG
+#
+# http://www.kolabsystems.com/
+#
+# 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
+# <http://www.gnu.org/licenses/>.
+
+VERSION=1
+
+. /usr/share/univention-lib/all.sh
+. /usr/share/univention-join/joinscripthelper.lib
+joinscript_init
+
+eval "$(ucr shell)"
+
+# de-configure firewall (configured in postinst)
+ucr set security/packetfilter/package/kolab-mta/tcp/25/all \
+	security/packetfilter/package/kolab-mta/tcp/25/all/en \
+	security/packetfilter/package/kolab-mta/tcp/465/all \
+	security/packetfilter/package/kolab-mta/tcp/465/all/en \
+	security/packetfilter/package/kolab-mta/tcp/587/all \
+	security/packetfilter/package/kolab-mta/tcp/587/all/en
+[ -x "/etc/init.d/univention-firewall" ] && invoke-rc.d univention-firewall restart
+
+# remove service from my host object
+ucs_removeServiceFromLocalhost "SMTP" "$@"
+
+joinscript_remove_script_from_status_file kolab-mta
+
+exit 0


commit e2f6c9763bf0c03b849a5abeef15f2ae4b7a9501
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Fri Mar 27 16:21:59 2015 +0100

    Add kolab-imap unjoin script (#4351)

diff --git a/ucs/debian/kolab-imap.install b/ucs/debian/kolab-imap.install
index f5c2b8e..ebbc439 100644
--- a/ucs/debian/kolab-imap.install
+++ b/ucs/debian/kolab-imap.install
@@ -1,2 +1,3 @@
 81kolab-imap.inst usr/lib/univention-install/
+81kolab-imap.uinst usr/lib/univention-install/
 kolab-imap usr/lib/univention-server/server_password_change.d/
diff --git a/ucs/kolab-imap-unjoin-script.sh b/ucs/kolab-imap-unjoin-script.sh
new file mode 100755
index 0000000..7b89e99
--- /dev/null
+++ b/ucs/kolab-imap-unjoin-script.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Kolab Systems Postfix Mail Server
+#  unjoin script
+#
+# Copyright 2015 Kolab Systems AG
+#
+# http://www.kolabsystems.com/
+#
+# 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
+# <http://www.gnu.org/licenses/>.
+
+VERSION=1
+
+. /usr/share/univention-lib/all.sh
+. /usr/share/univention-join/joinscripthelper.lib
+joinscript_init
+
+eval "$(ucr shell)"
+
+# de-configure firewall (configured in postinst)
+ucr unset security/packetfilter/package/kolab-imap/tcp/110/all \
+	security/packetfilter/package/kolab-imap/tcp/110/all/en \
+	security/packetfilter/package/kolab-imap/tcp/143/all \
+	security/packetfilter/package/kolab-imap/tcp/143/all/en \
+	security/packetfilter/package/kolab-imap/tcp/993/all \
+	security/packetfilter/package/kolab-imap/tcp/993/all/en \
+	security/packetfilter/package/kolab-imap/tcp/995/all \
+	security/packetfilter/package/kolab-imap/tcp/995/all/en \
+	security/packetfilter/package/kolab-imap/tcp/4190/all \
+	security/packetfilter/package/kolab-imap/tcp/4190/all/en
+[ -x "/etc/init.d/univention-firewall" ] && invoke-rc.d univention-firewall restart
+        
+# remove service from my host object
+ucs_removeServiceFromLocalhost "IMAP" "$@"
+
+joinscript_remove_script_from_status_file kolab-imap
+
+exit 0


commit e7d71342d5aa13f10f1ced84a10579a4fa862abf
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Fri Mar 27 15:51:05 2015 +0100

    Fix trivial typo in kolab-webclient join script

diff --git a/ucs/kolab-webclient-join-script.sh b/ucs/kolab-webclient-join-script.sh
index b9085b4..c06430d 100755
--- a/ucs/kolab-webclient-join-script.sh
+++ b/ucs/kolab-webclient-join-script.sh
@@ -146,7 +146,7 @@ ucr set \
     ucs/web/overview/entries/service/kolab-webclient/description/de?"Nachrichten, Kontakte, Termine, Aufgaben und Notizen verwalten"
 
 # add service to my host object
-ucs_addServiceToLocalhost Kolab-Webclient"" "$@"
+ucs_addServiceToLocalhost "Kolab-Webclient" "$@"
 
 joinscript_save_current_version
 


commit f9c58f863eb2ed03036f13dc8d5301bb5afa2da0
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Fri Mar 27 15:50:49 2015 +0100

    Add license header to kolab-imap join script

diff --git a/ucs/kolab-imap-join-script.sh b/ucs/kolab-imap-join-script.sh
index 87a4d24..7fe8cd8 100755
--- a/ucs/kolab-imap-join-script.sh
+++ b/ucs/kolab-imap-join-script.sh
@@ -1,4 +1,34 @@
 #!/bin/sh
+#
+# Kolab Systems Cyrus Mail Server
+#  join script
+#
+# Copyright 2012-2015 Kolab Systems AG
+#
+# http://www.kolabsystems.com/
+#
+# 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
+# <http://www.gnu.org/licenses/>.
 
 VERSION=3
 


commit 4a95e39a0374c07c298068314bc36ebfe58a44ff
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Fri Mar 27 11:39:30 2015 +0100

    Update kolab-mta-join-script header

diff --git a/ucs/kolab-mta-join-script.sh b/ucs/kolab-mta-join-script.sh
index b5005b7..cc71d5e 100755
--- a/ucs/kolab-mta-join-script.sh
+++ b/ucs/kolab-mta-join-script.sh
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# Kolab Systems Mail Postfix Kolab2
+# Kolab Systems Postfix Mail Server
 #  join script
 #
 # Copyright 2011-2012 Univention GmbH
-#           2011-1012 Kolab Systems AG
+#           2011-1015 Kolab Systems AG
 #
 # http://www.kolabsystems.com/
 #


commit a54fa688b45a6d89864cad609c7ad72d64eb6709
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Mar 25 15:33:38 2015 +0100

    Install the KolabEnabled hook (#3616)

diff --git a/ucs/debian/kolab-ucs.dirs b/ucs/debian/kolab-ucs.dirs
index 8bb565e..b3074f9 100644
--- a/ucs/debian/kolab-ucs.dirs
+++ b/ucs/debian/kolab-ucs.dirs
@@ -1,2 +1,3 @@
 usr/lib/univention-install/
 usr/share/doc/kolab-schema/
+usr/share/kolab-ucs/
diff --git a/ucs/debian/kolab-ucs.install b/ucs/debian/kolab-ucs.install
index dbfca12..e839c18 100644
--- a/ucs/debian/kolab-ucs.install
+++ b/ucs/debian/kolab-ucs.install
@@ -1,2 +1,3 @@
 65kolab-ucs.inst /usr/lib/univention-install
 univention-kolab3.acl /usr/share/doc/kolab-schema
+hookKolabEnabled.py /usr/share/kolab-ucs


commit a771e02ec46ef02b4a2e2afb0243bae5181b3df9
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Mar 25 14:32:41 2015 +0100

    Add extended attribute for the KolabEnabled hook (#3616)

diff --git a/ucs/kolab-ucs-join-script.sh b/ucs/kolab-ucs-join-script.sh
index a734e7c..14750f3 100755
--- a/ucs/kolab-ucs-join-script.sh
+++ b/ucs/kolab-ucs-join-script.sh
@@ -87,6 +87,34 @@ udm users/user create "$@" --ignore_exists \
 	--set "lastname=Administrator" \
 	--position "cn=users,${ldap_base}"
 
+udm settings/extended_attribute create "$@" --ignore_exists \
+	--set objectClass=univentionObject \
+	--set name=KolabEnabled \
+	--set CLIName=KolabEnabled \
+	--append module=users/user \
+	--set tabName="Account" \
+	--set tabAdvanced=0 \
+	--set overwriteTab=0 \
+	--set groupName="Kolab Groupware" \
+	--set shortDescription="Kolab Groupware Account" \
+	--set longDescription="Defines if the user can use Kolab Groupware features" \
+	--append translationShortDescription='"de_DE" "Kolab Groupware Konto"' \
+	--append translationLongDescription='"de_DE" "Legt fest, ob der Nutzer Kolab Groupware Funktionen nutzen kann"' \
+	--set hook=hookKolabEnabled \
+	--set ldapMapping=kolabDummyAttribute \
+	--set deleteObjectClass=0 \
+	--set version=2 \
+	--set valueRequired=0 \
+	--set fullWidth=0 \
+	--set doNotSearch=0 \
+	--set syntax=boolean \
+	--set default=1 \
+	--set mayChange=1 \
+	--set multivalue=0 \
+	--set notEditable=0 \
+	--set disableUDMWeb=0 \
+	--position "cn=custom attributes,cn=univention,${ldap_base}"
+
 ### Admin Settings
 # Forwards
 addUserAttribute KolabForwardAddress \


commit 2647a3b6957403925a1789a9d35e80d88ba3cfd2
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Mar 25 14:31:53 2015 +0100

    Register the KolabEnabled hook in LDAP (#3616)

diff --git a/ucs/kolab-ucs-join-script.sh b/ucs/kolab-ucs-join-script.sh
index 0a38594..a734e7c 100755
--- a/ucs/kolab-ucs-join-script.sh
+++ b/ucs/kolab-ucs-join-script.sh
@@ -33,11 +33,10 @@ ucs_addServiceToLocalhost "kolab" "$@"
 
 # Register LDAP schema extensions
 ucs_registerLDAPExtension "$@" \
-	--schema /usr/share/doc/kolab-schema/kolab3.schema
-ucs_registerLDAPExtension "$@" \
-	--schema /usr/share/doc/kolab-schema/univention-kolab3-wrapper.schema
-ucs_registerLDAPExtension "$@" \
-	--acl /usr/share/doc/kolab-schema/univention-kolab3.acl
+	--schema /usr/share/doc/kolab-schema/kolab3.schema \
+	--schema /usr/share/doc/kolab-schema/univention-kolab3-wrapper.schema \
+	--acl /usr/share/doc/kolab-schema/univention-kolab3.acl \
+	--udm_hook /usr/share/kolab-ucs/hookKolabEnabled.py
 
 # If there is no default kolab home server ...
 kolab_home=$(udm settings/default list "$@"


commit de20ab38c99c00a321763881fbc3202f37202052
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Tue Mar 24 18:00:00 2015 +0100

    Add a hook to add and remove the Kolab LDAP attributes (#3616)

diff --git a/ucs/kolab-ucs-hookKolabEnabled.py b/ucs/kolab-ucs-hookKolabEnabled.py
new file mode 100644
index 0000000..afc8033
--- /dev/null
+++ b/ucs/kolab-ucs-hookKolabEnabled.py
@@ -0,0 +1,110 @@
+#!/usr/bin/python2.7
+#
+# Copyright (C) 2015 Kolab Systems AG
+#
+# http://kolabsystems.com/
+#
+# All rights reserved.
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+from univention.admin.hook import simpleHook
+import univention.debug as ud
+
+VALUE_ENABLED = '1'
+NAME_OBJECTCLASS = 'kolabInetOrgPerson'
+NAME_ATTRIBUTE = 'kolabDummyAttribute'
+NAME_PROPERTY = 'KolabEnabled'
+REMOVE_ATTRIBUTES = [
+	'KolabForwardAddress',
+	'KolabForwardActive',
+	'KolabForwardKeepCopy',
+	'KolabForwardUCE',
+	'KolabVacationText',
+	'KolabVacationActive',
+	'KolabVacationAddress',
+	'KolabVacationNoReactDomain',
+	'KolabDeliveryToFolderName',
+	'KolabDeliveryToFolderActive',
+]
+
+import pprint
+
+class hookKolabEnabled(simpleHook):
+
+	def hook_open(self, module):
+		ud.debug(ud.ADMIN, ud.ALL, 'admin.hook.hookKolabEnabled: _open called')
+
+		if NAME_OBJECTCLASS in module.oldattr.get('objectClass', []):
+			module[NAME_PROPERTY] = VALUE_ENABLED
+		ud.debug(ud.ADMIN, ud.ALL, 'admin.hook.hookKolabEnabled: _open (value=%r)' % module[NAME_PROPERTY])
+
+	def hook_ldap_addlist(self, module, al=[]):
+		ud.debug(ud.ADMIN, ud.ALL, 'admin.hook.hookKolabEnabled.addlist (value=%r)' % module[NAME_PROPERTY])
+		if module[NAME_PROPERTY] == VALUE_ENABLED:
+			al.append(('objectClass', '', NAME_OBJECTCLASS))
+		for item in al[:]:
+			if item[0] == NAME_ATTRIBUTE:
+				al.remove(item)
+		ud.debug(ud.ADMIN, ud.ALL, 'admin.hook.hookKolabEnabled.addlist\n al = %s' % pprint.PrettyPrinter(indent=4).pformat(al))
+		return al
+
+	def hook_ldap_modlist(self, module, ml=[]):
+		"""Add or remove objectClass when UDM checkbox is enabled or disabled."""
+		ud.debug(ud.ADMIN, ud.ALL, 'admin.hook.hookKolabEnabled.modlist (value=%r)' % module[NAME_PROPERTY])
+
+		# compute new accumulated objectClass
+		old_ocs = module.oldattr.get('objectClass', [])
+		ocs = set(old_ocs)
+
+		is_enabled = module[NAME_PROPERTY] == VALUE_ENABLED
+
+		for modification in ml[:]:
+			attr, remove_val, add_val = modification
+
+			if attr == 'objectClass':
+				if not isinstance(remove_val, list):
+					remove_val = set([remove_val])
+				ocs -= set(remove_val)
+
+				if not isinstance(add_val, list):
+					add_val = set([add_val])
+					add_val.discard('')
+				ocs |= set(add_val)
+
+				ml.remove(modification)
+
+			elif not is_enabled and attr in REMOVE_ATTRIBUTES:
+				ml.remove(modification)
+			elif attr == NAME_ATTRIBUTE:
+				ml.remove(modification)
+
+		if is_enabled:
+			ocs.add(NAME_OBJECTCLASS)
+		else:
+			ocs.discard(NAME_OBJECTCLASS)
+			for attr in REMOVE_ATTRIBUTES:
+				ml.append((attr, module.oldattr.get(attr, ''), ''))
+
+		ml.append(('objectClass', old_ocs, list(ocs)))
+
+		ud.debug(ud.ADMIN, ud.ALL, 'admin.hook.hookKolabEnabled.modlist\n ml = %s' % pprint.PrettyPrinter(indent=4).pformat(ml))
+		return ml


commit e16f76280714c63fb7f835446ee1e70ae62a7cdd
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Mon Mar 23 16:35:04 2015 +0100

    Update kolab-freebusy config after UCS password change (#4886)

diff --git a/ucs/kolab-webclient-passwd-change.sh b/ucs/kolab-webclient-passwd-change.sh
index bd109d8..c01ef57 100755
--- a/ucs/kolab-webclient-passwd-change.sh
+++ b/ucs/kolab-webclient-passwd-change.sh
@@ -35,5 +35,9 @@ if [ "$1" = "postchange" ] ; then
                 /etc/roundcubemail/config.inc.php \
                 /etc/roundcubemail/calendar.inc.php \
                 /etc/roundcubemail/kolab_auth.inc.php
+
+	# Also update kolab-freebusy config
+        univention-config-registry commit \
+                /etc/kolab-freebusy/config.ini
 fi
 


commit c5c3214d04e7ca04f13ba814d2cac47dcc817930
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Mon Mar 23 16:20:00 2015 +0100

    Fix missing semicolon in /etc/roundcubemail/config.inc.php (#4899)

diff --git a/ucs/conffiles/etc/roundcubemail/config.inc.php b/ucs/conffiles/etc/roundcubemail/config.inc.php
index 7793b3b..6e62da6 100644
--- a/ucs/conffiles/etc/roundcubemail/config.inc.php
+++ b/ucs/conffiles/etc/roundcubemail/config.inc.php
@@ -9,7 +9,7 @@ import os
 if os.path.exists('/etc/roundcube.secret'):
 	print "    $config['db_dsnw'] = 'mysql://roundcube:%s@localhost/roundcubemail';" % (open('/etc/roundcube.secret','r').read().strip());
 else:
-	print "    $config['db_dsnw'] = 'ROUNDCUBE.SECRET_IS_MISSING'";
+	print "    $config['db_dsnw'] = 'ROUNDCUBE.SECRET_IS_MISSING';";
 @!@
 
     $config['session_domain'] = '';





More information about the commits mailing list