Updated apache2 upgrade function.
authorValentin Vidic <vvidic@carnet.hr>
Mon, 17 Mar 2008 09:55:52 +0000 (10:55 +0100)
committerValentin Vidic <vvidic@carnet.hr>
Mon, 17 Mar 2008 09:55:52 +0000 (10:55 +0100)
src/actions/main.queue
src/functions.sh

index 434219e..5e6aa78 100644 (file)
@@ -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
index 7c6aab7..d832d8f 100644 (file)
@@ -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 () {