X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=c075a880b8086eb66359c542f43cea4a49b61535;hb=7a88bf24e860e4f1095fbf6da721e3c4f6ec265f;hp=2e7a776495bedc205ead8052a0deedc122c516ef;hpb=7be409085cb525c489abaee15edf87d37ca034c8;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 2e7a776..c075a88 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -367,7 +367,7 @@ check_upgrade () { if [ "$upgrade" ]; then notice " -Prije prelaska na Debian Squeeze potrebno je napraviti nadogradnju ovih paketa: +Prije prelaska na Debian Wheezy potrebno je napraviti nadogradnju ovih paketa: $upgrade Pokrenite: @@ -888,6 +888,11 @@ upgrade_amavis () { # handle mysql 5.0 to 5.1 upgrade upgrade_mysql () { + # libc6-dev prevents mysql upgrade + if pkg libc6-dev; then + pkgrm libc6-dev + fi + if pkg mysql-server || pkg mysql-server-5.1; then pkgadd mysql-server dpkg -P mysql-server-5.1 @@ -913,7 +918,15 @@ upgrade_postfix () { # upgrade the IMAP server upgrade_dovecot() { - if [ ! -f /etc/dovecot/conf.d/95-local ]; then + local local_conf=/etc/dovecot/conf.d/95-${backup_ext}.conf + + if [ -f /etc/dovecot/conf.d/95-local -a ! -f $local_conf ]; then + mv /etc/dovecot/conf.d/95-local $local_conf + sed -i 's/\/usr\/lib\/dovecot\/modules\/imap/\/usr\/lib\/dovecot\/modules/g' $local_conf + /etc/init.d/dovecot restart + fi + + if [ ! -f $local_conf ]; then pkgrm dovecot-cn # restore config @@ -943,7 +956,8 @@ upgrade_dovecot() { # install new version and restore local changes pkgadd dovecot-core - doveconf -n -c /etc/dovecot/dovecot.conf.$backup_ext > /etc/dovecot/conf.d/95-local + doveconf -n -c /etc/dovecot/dovecot.conf.$backup_ext > $local_conf + sed -i 's/\/user\/lib\/dovecot\/modules\/imap/\/usr\/lib\/dovecot\/modules/g' $local_conf pkgadd dovecot-cn fi @@ -1000,6 +1014,12 @@ get_variable () { echo $val } +# switch to rsyslog +upgrade_syslog() { + pkgadd rsyslog + dpkg -P sysklogd klogd +} + # restore munin configs for silent upgrade upgrade_munin () { local config backup hostname domain