From 42e59f2c1715cc357d7f6fd0dfcae7e295e07a02 Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Mon, 17 Mar 2008 10:55:52 +0100 Subject: [PATCH] Updated apache2 upgrade function. --- src/actions/main.queue | 2 +- src/functions.sh | 46 +++++++++++++++------------------------------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/src/actions/main.queue b/src/actions/main.queue index 434219e..5e6aa78 100644 --- a/src/actions/main.queue +++ b/src/actions/main.queue @@ -24,7 +24,7 @@ pkg mrtg-cn pkgrm mrtg mrtg-cn # zamjenjeno sa munin true restore_configs # konacno, instalacija novih paketa pkg amavisd-cn upgrade_amavis -pkg apache-cn upgrade_apache +pkg apache2-cn upgrade_apache2 pkg dovecot-cn upgrade_dovecot pkg postfix-cn pkgadd postfix-cn pkg postgrey pkgrm postgrey # problematican diff --git a/src/functions.sh b/src/functions.sh index 7c6aab7..d832d8f 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -594,38 +594,22 @@ upgrade_libc () { DEBIAN_FRONTEND=noninteractive pkgadd libc6 } -# upgrade apache -> apache2 -upgrade_apache () { - local delpkg p - - # bugfix for apache2-cn postinst - mkdir -p /etc/apache2 - touch /etc/apache2/httpd.conf - - # temporary remove packages conflicting with apache2 - delpkg="" - for p in aosi-aai aosi-www-aai \ - php4-cn php4-odbc php4-xslt \ - squirrelmail-cn; do - - # remember installed packages - if pkg $p; then - delpkg="$delpkg $p" - fi +# upgrade apache2 to etch +upgrade_apache2 () { + local package + + for package in \ + libapache-mod-php4 \ + libapache2-mod-php4 \ + php4-cli \ + php4-cgi \ + php4-cn \ + apache2-cn + do + if pkg $package; then + pkgadd $package + fi done - - # remove (but not purge) problematic packages - if [ "$delpkg" ]; then - eval apt-get --yes remove $delpkg - fi - - # remove old apache - pkgrm apache apache-common - - # install new packages - eval pkgadd apache2-cn apache2-mpm-prefork \ - php4-cn libapache2-mod-php4 \ - $delpkg } upgrade_amavis () { -- 1.7.10.4