Fixed bug in apache upgrade function.
authorValentin Vidic <vvidic@carnet.hr>
Mon, 28 Jan 2008 15:36:35 +0000 (16:36 +0100)
committerValentin Vidic <vvidic@carnet.hr>
Mon, 28 Jan 2008 15:36:35 +0000 (16:36 +0100)
src/functions.sh

index 8183ddc..35cfa6b 100644 (file)
@@ -497,9 +497,17 @@ upgrade_apache () {
   for p in aosi-aai aosi-www-aai \
            php4-cn php4-odbc php4-xslt \
            squirrelmail-cn; do
-     pkg p && delpkg="$delpkg $p"
+
+     # remember installed packages
+     if pkg $p; then
+         delpkg="$delpkg $p"
+     fi
   done
-  eval pkgrm $delpkg
+
+  # remove problematic stuff
+  eval apt-get --yes remove $delpkg
+
+  # remove old apache
   pkgrm apache apache-common
 
   # install new packages