From: Valentin Vidic Date: Wed, 20 Feb 2008 15:16:39 +0000 (+0100) Subject: Always try to restore apache configs. X-Git-Tag: debian/4.0.1~38 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=84091b800ec8b7d65f44a1b241ca1c8a766fc558;p=carnet-upgrade.git Always try to restore apache configs. --- diff --git a/src/functions.sh b/src/functions.sh index 168bc91..80e1894 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -523,6 +523,20 @@ restore_configs () { rm -vf "$file" done fi + + # register cn changes in apache files + for config in /etc/php4/cgi/php.ini \ + /etc/php4/cli/php.ini \ + /etc/php4/apache/php.ini \ + /etc/php4/apache2/php.ini \ + /etc/apache/modules.conf + do + config_backup=$config.$backup_ext + if [ -e $config -a ! -e $config_backup ]; then + cp -av $config $config_backup + ucf $config_backup $config + fi + done } # temporary disable listchanges packages to reduce clutter during upgrade @@ -597,20 +611,6 @@ upgrade_apache () { eval apt-get --yes remove $delpkg fi - # register cn changes in apache files - for config in /etc/php4/cgi/php.ini \ - /etc/php4/cli/php.ini \ - /etc/php4/apache/php.ini \ - /etc/php4/apache2/php.ini \ - /etc/apache/modules.conf - do - config_backup=$config.$backup_ext - if [ ! -e $config_backup ]; then - cp -av $config $config_backup - ucf $config_backup $config - fi - done - # remove old apache pkgrm apache apache-common