true restore_configs
pkg munin-cn upgrade_munin
# konacno, instalacija novih paketa
-#pkg openldap-aai prepare_openldap
-#pkg freeradius-aai upgrade_freeradius
-#pkg openldap-aai upgrade_openldap
+pkg freeradius-aai upgrade_freeradius
+pkg openldap-aai upgrade_openldap
pkg amavisd-new upgrade_amavis
pkg apache2-cn upgrade_apache2
pkg postfix-cn upgrade_postfix
# handle freerdius upgrade
upgrade_freeradius () {
- local template config_new password realm hostname basedn
-
- pkg freeradius-aai lt 2.1.3-0lenny0 || return 0
+ pkg freeradius-aai lt 2.1.10-1 || return 0
# aai team prevents a clean upgrade
cp -av /etc/freeradius /etc/freeradius.$backup_ext
pkgadd freeradius-aai
}
-# prepare for slapd upgrade (caused by freeradius installation)
-prepare_openldap () {
- pkg openldap-aai lt 2.4 || return 0
-
- # openldap-aai expects org.ldif to exists
- local ldif=/var/lib/ldap/org.ldif
- local ldif_backup=/var/lib/carnet-upgrade/org.ldif
- if [ -f $ldif ]; then
- cp -v $ldif $ldif_backup
- fi
-}
-
-# fix openldap-aai postinst user handling
+# handle openldap upgrade
upgrade_openldap () {
- pkg openldap-aai lt 2.4 || return 0
-
- # slapd postinst fails if move_old_database is false
- echo 'slapd slapd/move_old_database boolean true' | debconf-set-selections
+ # aai does not depend on the new openldap version
pkgadd slapd
-
- # slapd removes org.ldif during switch from ldap -> openldap user
- local ldif=/var/lib/ldap/org.ldif
- local ldif_backup=/var/lib/carnet-upgrade/org.ldif
- if [ -f $ldif_backup -a ! -f $ldif ]; then
- cp -v $ldif_backup $ldif
- fi
-
- # openldap-aai postinst fails here because of database permissions
- apt-get -y install openldap-aai || true
- chown -R openldap:openldap /var/lib/ldap
- /etc/init.d/slapd restart
- dpkg --configure -a
-
- # remove ldap user if openldap works
- if getent passwd ldap > /dev/null && \
- getent passwd openldap > /dev/null && \
- pgrep -U openldap slapd > /dev/null
- then
- log "userdel ldap (replaced by openldap)"
- userdel ldap || true
- fi
+ pkgadd openldap-aai
}
# fix postgresql deinstallation during upgrade