# Ivan 'ico' Rako <irako@srce.hr>
# Zoran Dzelajlija <jelly@srce.hr>
true first_warning
-#true check_upgrade
-#true remove_bloat
+true check_upgrade
+true remove_bloat
true comment_force_overwrite # ruzna opcija za dpkg
pkg libpam-skey pkgrm libpam-skey
pkg skey-cn pkgrm skey-cn
true update # apt-get update & download
true check_disk_space
! debconf_priority check debconf_priority set # utisaj debconf
-pkg apt-listchanges-cn pkgrm apt-listchanges-cn # ne postoji vise
true upgrade_libc
true install_keyrings
# popravi konfiguracije koje stvaraju probleme
pkg mrtg-cn pkgrm mrtg mrtg-cn # zamjenjeno sa munin
# konacno, instalacija novih paketa
pkg amavisd-cn upgrade_amavis
-pkg apache-cn upgrade_apache
-pkg mrtg-cn pkgadd munin-cn
pkg postfix-cn upgrade_postfix
pkg dovecot-cn upgrade_dovecot
pkg openldap-aai upgrade_openldap
+pkg apache-cn upgrade_apache
+pkg mrtg-cn pkgadd munin-cn
pkg ntp-cn upgrade_ntp
true upgrade first # neki paketi moraju rucno
true upgrade second # neke pakete zelimo ranije
mv $file $file_backup
# install original
+ log Restoring config file $file
cp /usr/share/carnet-upgrade/files/$file $file
fi
done
# make a silent installation of carnet and srce keyrings
install_keyrings () {
pkgadd carnet-keyring srce-keyring
- pkgadd dpkg apt
+ pkgadd dpkg apt debconf
dpkg-reconfigure carnet-keyring srce-keyring
update
mkdir -p /etc/apache2
touch /etc/apache2/httpd.conf
- pkgadd php4-odbc php4-xslt mktemp
+ pkgadd php4-odbc php4-xslt
# apache2 conflicts with these
pkgrm apache aosi-aai aosi-www-aai php4-cn squirrelmail-cn
# apache2-cn postinst needs new mktemp
- pkgadd apache2-cn php5-cn aosi-aai aosi-www-aai # squirrelmail-cn
+ #pkgadd apache2-cn php5-cn aosi-aai aosi-www-aai # squirrelmail-cn
+
+ pkgadd apache2 apache2-mpm-prefork libapache2-mod-php4 ssl-cert
+ apt-get install -y -d apache2-cn php4-cn
+ apt-get autoclean
+ dpkg -i --ignore-depends=apache2-cn \
+ /var/cache/apt/archives/apache2-cn_* \
+ /var/cache/apt/archives/php4-cn_*
+
+ export CARNET_SCRIPT_DEBUG=1
+ pkgadd aosi-aai aosi-www-aai # squirrelmail-cn
+ unset CARNET_SCRIPT_DEBUG
+
}
upgrade_amavis () {
fi
pkgadd amavisd-cn amavisd-new
+
+ check_and_sed '^clamd.*5.clamav.log$' \
+ 's/^\(clamd.*\)5.clamav.log$/\14\tsocket/g' \
+ /etc/inet.d/amavisd-cn || true
}
# fix openldap-aai postinst user handling
upgrade_openldap () {
- apt-get -y$s install openldap-aai || true
- chown -R openldap:openldap /var/lib/ldap
+ #pkgrm openldap-cn # deprecated
+ apt-get -y$s install openldap-aai || true # postinst fails
+ chown -R openldap:openldap /var/lib/ldap # fix slapd
/etc/init.d/slapd restart
- dpkg --configure -a
+ dpkg --configure -a # try postinst again
}
# workaround postfix-cn dependencies