projects
/
carnet-upgrade.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for slapd postinst failure.
[carnet-upgrade.git]
/
src
/
functions.sh
diff --git
a/src/functions.sh
b/src/functions.sh
index
d832d8f
..
46bb6f6
100644
(file)
--- a/
src/functions.sh
+++ b/
src/functions.sh
@@
-596,20
+596,29
@@
upgrade_libc () {
# upgrade apache2 to etch
upgrade_apache2 () {
# upgrade apache2 to etch
upgrade_apache2 () {
- local package
+ local package packages
+
+ # php-suhosin-cn causes removal of applications on dist-upgrade
+ # because of php5 only dependencies
+ pkgrm php-suhosin-cn
for package in \
for package in \
- libapache-mod-php4 \
libapache2-mod-php4 \
php4-cli \
php4-cgi \
php4-cn \
libapache2-mod-php4 \
php4-cli \
php4-cgi \
php4-cn \
- apache2-cn
+ apache2-cn \
+ php4-odbc \
+ php4-suhosin
do
if pkg $package; then
do
if pkg $package; then
- pkgadd $package
+ packages="$packages $package"
fi
done
fi
done
+
+ for package in $packages; do
+ pkgadd $package
+ done
}
upgrade_amavis () {
}
upgrade_amavis () {
@@
-641,13
+650,32
@@
upgrade_amavis () {
# fix openldap-aai postinst user handling
upgrade_openldap () {
# fix openldap-aai postinst user handling
upgrade_openldap () {
- #pkgrm openldap-cn # deprecated
+ # slapd postinst fails if this is false
+ echo 'slapd slapd/move_old_database boolean true' | debconf-set-selections
+
+ # 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
}
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
}
+# fix postgresql deinstallation during upgrade
+upgrade_postgresql () {
+ if check_services show 2>&1 | grep -qw postgresql; then
+ pkgadd postgresql || apt-get -f install
+ fi
+}
+
+# upgrade the MTA
+upgrade_postfix () {
+ pkgadd postfix-cn
+
+ if pkg postgrey; then
+ pkgrm postgrey # not used by postfix-cn anymore
+ fi
+}
+
get_variable () {
local name=$1 file=$2 val
get_variable () {
local name=$1 file=$2 val
@@
-691,16
+719,6
@@
upgrade_dovecot () {
fi
}
fi
}
-# vsftpd.postinst tries to start vsftpd so make sure it is not running
-upgrade_vsftpd () {
- if [ -x /etc/init.d/vsftpd ]; then
- /etc/init.d/vsftpd stop || true
- fi
-
- pkg vsftpd && pkgadd vsftpd
- pkg vsftpd-cn && pkgadd vsftpd-cn
-}
-
# fix /etc/dpkg/dpkg.cfg
comment_force_overwrite () {
if [ -f /etc/dpkg/dpkg.cfg ]; then
# fix /etc/dpkg/dpkg.cfg
comment_force_overwrite () {
if [ -f /etc/dpkg/dpkg.cfg ]; then