# 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 \
- libapache-mod-php4 \
libapache2-mod-php4 \
php4-cli \
php4-cgi \
php4-cn \
- apache2-cn
+ apache2-cn \
+ php4-odbc \
+ php4-suhosin
do
if pkg $package; then
- pkgadd $package
+ packages="$packages $package"
fi
done
+
+ for package in $packages; do
+ pkgadd $package
+ done
}
upgrade_amavis () {
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
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