1. Das schema-Paket sollte auch den LDAP-Server neu starten, wenn das Schema installiert wird 2. Beim entfernen des Schema-Pakets verschwindet die /u/s/u-ldap/schema/*.schema-Datei, welche aber noch von /etc/ldap/slapd.conf includiert wird. Sie ist damit ungültig und der der LDAP-Server wird nicht mehr starten. 3. Explizite Referenzen auf python2.4 vermeiden und Dateien direkt in /u/s/pyshared ablegen, den Rest erledigt pycentral. 4. Nach dem Installieren des UDM-Module sollte der UDM-cli-Server neu gestartet werden. Eigenschaftsänderungen: debian ___________________________________________________________________ Hinzugefügt: svn:ignore + *.debhelper *.log *.substvars *.conffiles files Index: debian/control =================================================================== --- debian/control (Revision 22310) +++ debian/control (Arbeitskopie) @@ -2,14 +2,21 @@ Section: univention Priority: optional Maintainer: Univention GmbH -Build-Depends: debhelper, univention-config-dev, python2.4, python-all-dev, python-central +Build-Depends: debhelper, + univention-config-dev, + python2.4, + python-all-dev, + python-central Standards-Version: 3.7.2 XS-Python-Version: 2.4 Package: univention-directory-manager-module-example Architecture: all -Depends: univention-config-registry, univention-directory-manager-tools, univention-directory-manager-module-example-schema -XB-Python-Version: 2.4 +Depends: univention-config-registry, + univention-directory-manager-tools, + ${misc:Depends}, ${python:Depends} +Recommends: univention-directory-manager-module-example-schema, +XB-Python-Version: ${python:Versions} Description: Univention Directory Manager example module to manage IP phones This package contains an Univention Directory Manager module that demonstrates how custom LDAP objects can be managed with the @@ -17,10 +24,11 @@ Package: univention-directory-manager-module-example-schema Architecture: all -Depends: univention-config-registry, univention-directory-manager-tools -XB-Python-Version: 2.4 +Depends: univention-config-registry, + ${misc:Depends} Description: Univention Directory Manager example module to manage IP phones This package contains the LDAP-schema for univention-directory-manager-module-example. + . It needs to be installed on the DC Master to be available for LDAP operations, and is strongly recommended to be installed in the DC Backup to be available in case the DC Backup has to replace the DC Master (univention-backup2master). Index: debian/postinst =================================================================== --- debian/postinst (Revision 22310) +++ debian/postinst (Arbeitskopie) @@ -1,4 +0,0 @@ -#!/bin/sh - -#DEBHELPER# - Eigenschaftsänderungen: debian/univention-directory-manager-module-example-schema.univention-config-registry ___________________________________________________________________ Hinzugefügt: svn:mergeinfo Index: debian/rules =================================================================== --- debian/rules (Revision 22310) +++ debian/rules (Arbeitskopie) @@ -16,15 +16,16 @@ # This has to be exported to make some magic below work. #export DH_OPTIONS -PYVERS=$(shell pyversions -vr) -D=debian/univention-directory-manager-module-example -DS=debian/univention-directory-manager-module-example-schema +PYVERS := $(shell pyversions -vr) +D := debian/univention-directory-manager-module-example +DS := debian/univention-directory-manager-module-example-schema build: clean: dh_testdir dh_clean + $(RM) debian/*.conffiles install: build dh_testdir @@ -34,8 +35,8 @@ univention-install-config-registry install -m 0644 schema/ip-phone.schema ${DS}/usr/share/univention-ldap/schema/ - install -m 0644 modules/ip_phone.py ${D}/usr/lib/python2.4/site-packages/univention/admin/handlers/test/ - install -m 0644 modules/__init__.py ${D}/usr/lib/python2.4/site-packages/univention/admin/handlers/test/ + install -m 0644 modules/ip_phone.py ${D}/usr/share/pyshared/univention/admin/handlers/test/ + install -m 0644 modules/__init__.py ${D}/usr/share/pyshared/univention/admin/handlers/test/ install -m 0755 scripts/ip-phone-tool ${D}/usr/sbin/ dh_install --exclude=".svn" Index: debian/univention-directory-manager-module-example.univention-config-registry =================================================================== --- debian/univention-directory-manager-module-example.univention-config-registry (Revision 22310) +++ debian/univention-directory-manager-module-example.univention-config-registry (Arbeitskopie) @@ -1,5 +0,0 @@ -Type: subfile -Multifile: etc/ldap/slapd.conf -Subfile: etc/ldap/slapd.conf.d/11univention-ip-phone_schema -Variables: ldap/server/type -Variables: ldap/master Index: debian/univention-directory-manager-module-example.conffiles =================================================================== --- debian/univention-directory-manager-module-example.conffiles (Revision 22310) +++ debian/univention-directory-manager-module-example.conffiles (Arbeitskopie) @@ -1 +0,0 @@ -/etc/univention/templates/files/etc/ldap/slapd.conf.d/11univention-ip-phone_schema Index: debian/dirs =================================================================== --- debian/dirs (Revision 22310) +++ debian/dirs (Arbeitskopie) @@ -1,2 +1,2 @@ -usr/lib/python2.4/site-packages/univention/admin/handlers/test/ +usr/share/pyshared/univention/admin/handlers/test/ usr/sbin/ Index: debian/univention-directory-manager-module-example-schema.postinst =================================================================== --- debian/univention-directory-manager-module-example-schema.postinst (Revision 0) +++ debian/univention-directory-manager-module-example-schema.postinst (Revision 0) @@ -0,0 +1,24 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +case "$1" in +configure) + case "$(/usr/sbin/univention-config-registry get server/role)" in + domaincontroller_master) + invoke-rc.d slapd restart + ;; + esac + ;; + +abort-upgrade|abort-remove|abort-deconfigure) + ;; + +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +: Index: debian/univention-directory-manager-module-example-schema.postrm =================================================================== --- debian/univention-directory-manager-module-example-schema.postrm (Revision 0) +++ debian/univention-directory-manager-module-example-schema.postrm (Revision 0) @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +case "$1" in +remove) + /usr/sbin/univention-config-registry commit /etc/ldap/slapd.conf + ;; + +purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + +*) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +: Index: debian/univention-directory-manager-module-example.postinst =================================================================== --- debian/univention-directory-manager-module-example.postinst (Revision 0) +++ debian/univention-directory-manager-module-example.postinst (Revision 0) @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +pkill -f "python.\.. /usr/share/univention-directory-manager-tools/univention-cli-server" || true + +: Index: debian/conffiles =================================================================== --- debian/conffiles (Revision 22310) +++ debian/conffiles (Arbeitskopie) @@ -1 +0,0 @@ -/etc/univention/templates/files/etc/ldap/slapd.conf.d/11univention-ip-phone_schema Index: debian/copyright =================================================================== --- debian/copyright (Revision 22310) +++ debian/copyright (Arbeitskopie) @@ -1,4 +1,4 @@ -Copyright 2005-2010 Univention GmbH +Copyright 2005-2011 Univention GmbH http://www.univention.de/ Index: scripts/ip-phone-tool =================================================================== --- scripts/ip-phone-tool (Revision 22310) +++ scripts/ip-phone-tool (Arbeitskopie) @@ -222,6 +222,6 @@ parser.print_usage() sys.exit(1) udm_ipphone.clear_redirect( arguments[1] ) - else: + else: parser.print_usage() sys.exit(0) Index: conffiles/ldap/slapd.conf.d/11univention-ip-phone_schema =================================================================== --- conffiles/ldap/slapd.conf.d/11univention-ip-phone_schema (Revision 22310) +++ conffiles/ldap/slapd.conf.d/11univention-ip-phone_schema (Arbeitskopie) @@ -1,5 +1,7 @@ @!@ -if configRegistry['ldap/server/type']=='master': - print 'include /usr/share/univention-ldap/schema/ip-phone.schema' +import os.path +schema = '/usr/share/univention-ldap/schema/ip-phone.schema' +if configRegistry['ldap/server/type'] == 'master' and os.path.exists(schema): + print 'include %s' % schema @!@