projects
/
carnet-upgrade.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9cca6ed
)
Fixes for openldap and postgresql upgrade problems.
author
Valentin Vidic
<vvidic@carnet.hr>
Wed, 26 Mar 2008 15:31:36 +0000
(16:31 +0100)
committer
Valentin Vidic
<vvidic@carnet.hr>
Wed, 26 Mar 2008 15:31:36 +0000
(16:31 +0100)
src/functions.sh
patch
|
blob
|
history
diff --git
a/src/functions.sh
b/src/functions.sh
index
46bb6f6
..
2b6d3a0
100644
(file)
--- a/
src/functions.sh
+++ b/
src/functions.sh
@@
-650,20
+650,26
@@
upgrade_amavis () {
# fix openldap-aai postinst user handling
upgrade_openldap () {
# fix openldap-aai postinst user handling
upgrade_openldap () {
- # slapd postinst fails if this is false
+ pkg openldap-aai lt 2.3 || return 0
+
+ # slapd postinst fails if move_old_database is false
echo 'slapd slapd/move_old_database boolean true' | debconf-set-selections
echo 'slapd slapd/move_old_database boolean true' | debconf-set-selections
+ pkgadd slapd
+
+ # openldap-aai postinst fails here because of database permissions
+ if ! apt-get -y install openldap-aai; then
+ chown -R openldap:openldap /var/lib/ldap # fix slapd
+ /etc/init.d/slapd restart
- # workaround for race condition in openldap-aai postinst
- apt-get -y$s install openldap-aai || true # postinst fails
- chown -R openldap:openldap /var/lib/ldap # fix slapd
- /etc/init.d/slapd restart
- dpkg --configure -a # try postinst again
+ # try openldap-aai postinst again (also re-enables slurpd)
+ dpkg --configure -a
+ fi
}
# fix postgresql deinstallation during upgrade
upgrade_postgresql () {
if check_services show 2>&1 | grep -qw postgresql; then
}
# fix postgresql deinstallation during upgrade
upgrade_postgresql () {
if check_services show 2>&1 | grep -qw postgresql; then
- pkgadd postgresql || apt-get -f install
+ pkgadd postgresql
fi
}
fi
}