X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=09821a311c563e7f725c1b365a125e5e9889c0f2;hb=2674096de9a4b914d574bde48c7be14c9e33a80e;hp=928365f326b1bf169b84387e9a0421b27f739537;hpb=2d7ccea57a3773ad5edadf151c7528fe5e1e7064;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 928365f..09821a3 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -470,6 +470,16 @@ install_keyrings () { update } +# remove skey (not supported anymore) +remove_skey () { + pkgrm skey-cn libpam-skey + + if getent group skey > /dev/null; then + groupdel skey || true + log "groupdel skey" + fi +} + # make a silent upgrade to new libc6 upgrade_libc () { DEBIAN_FRONTEND=noninteractive pkgadd libc6 @@ -482,14 +492,31 @@ upgrade_apache () { mkdir -p /etc/apache2 touch /etc/apache2/httpd.conf + # register cn changes in modules.conf + modules_conf=/etc/apache/modules.conf + if [ ! -e "$modules_conf.cn4-upgrade" ]; then + cp "$modules_conf" "$modules_conf.cn4-upgrade" + ucf $modules_conf $modules_conf + fi + # temporary remove packages conflicting with apache2 delpkg="" 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 + if [ "$delpkg" ]; then + eval apt-get --yes remove $delpkg + fi + + # remove old apache pkgrm apache apache-common # install new packages