# 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
-pkg getunix pkgrm getunix # obsolete
-pkg getunix-cn pkgrm getunix-cn
+#pkg getunix pkgrm getunix # obsolete
+#pkg getunix-cn pkgrm getunix-cn
true fix_xinetd_conf # ima i post-upgrade provjeru
#pkg uw-imapd-ssl-cn post_upgrade pkgrm uw-imapd-ssl
pkg lynx-ssl-cn post_upgrade pkgadd lynx-cn
true update # apt-get update & download
true check_disk_space
! debconf_priority check debconf_priority set # utisaj debconf
+# popravi konfiguracije koje stvaraju probleme
+pkg amavisd-cn restore_config /etc/amavis/amavisd.conf
+pkg mysql-cn restore_config /etc/mysql/my.cnf
+pkg php4-cn restore_config /etc/php4/apache/php.ini
+pkg php4-cn restore_config /etc/php4/cgi/php.ini
+pkg php4-cn restore_config /etc/php4/cli/php.ini
+pkg dovecot-cn restore_config /etc/dovecot/dovecot.conf
+pkg bind9-cn restore_config /etc/bind/named.conf.options
+pkg kernel-2.6-cn restore_config /etc/security/limits.conf
+pkg mysql-cn restore_config /etc/init.d/mysql
+pkg openldap-aai restore_config /etc/init.d/slapd
+pkg openldap-aai restore_config /etc/default/slapd
+pkg xinetd-cn restore_config /etc/xinetd.conf
+pkg vsftpd-cn restore_config /etc/vsftpd.conf
+pkg ntp-cn restore_config /etc/ntp.conf
+pkg ntp-cn restore_config /etc/default/ntpdate
+pkg squirrelmail-cn restore_config /etc/squirrelmail/apache.conf
+pkg oidentd-cn restore_config /etc/default/oidentd
+pkg postfix-cn restore_config /etc/default/postgrey
+pkg postfix-cn restore_config /etc/default/saslauthd
+#pkg x restore_config /etc/sysctl.conf
+#pkg x restore_config /etc/apt/sources.list
+#pkg x restore_config /etc/default/aide
+#pkg x restore_config /etc/logrotate.d/mysql-server
+#pkg x restore_config /etc/aide/aide.conf
+#pkg x restore_config /etc/cron.daily/aide
+#pkg x restore_config /etc/issue.net
+#pkg x restore_config /etc/issue
+#pkg x restore_config /etc/pam.d/login
+pkg mrtg-cn pkgrm mrtg mrtg-cn # zamjenjeno sa munin
# konacno, instalacija novih paketa
+pkg amavisd-cn restore_amavis_init
+pkg apache-cn upgrade_apache
+pkg mrtg-cn pkgadd munin-cn
true upgrade first # neki paketi moraju rucno
true upgrade second # neke pakete zelimo ranije
pkg freeradius-cn lt 2:1.0.1-2 install_freeradius # neki su totalno poremeceni # fix 2.1.4
# funkcija utrpa ispravan sources.list
create_sources_list () {
[ -f /etc/apt/sources.list -a ! -f /etc/apt/sources.list.cn3-upgrade ] && mv /etc/apt/sources.list /etc/apt/sources.list.cn3-upgrade
- cp /usr/share/carnet-upgrade/files/sources.list /etc/apt
+ cp /usr/share/carnet-upgrade/files/etc/apt/sources.list /etc/apt
notice "Novi sadrzaj datoteke /etc/apt/sources.list:
`cat /etc/apt/sources.list`"
# backup_slapd_db
backup_slapd_db () {
- local ldap_backup=/var/backup/slapcat.cn3-upgrade
+ local ldap_backup=/var/backups/slapcat.cn3-upgrade
if [ ! -f $ldap_backup ]; then
[ -x /etc/init.d/freeradius ] && /etc/init.d/freeradius stop || true
for file in "$@"; do
# backup changes
- if [ -f "$file" -a ! -f "$file.cn3-upgrade" ]; then
+ if [ -e "$file" -a ! -e "$file.cn3-upgrade" ]; then
mv "$file" "$file.cn3-upgrade"
fi
# install original
- cp "/usr/share/carnet/upgrade/files/$file" "$file"
+ cp "/usr/share/carnet-upgrade/files/$file" "$file"
done
}
# upgrade apache -> apache2
-install_apache2 () {
- # bugfix za apache2-cn postinst
+upgrade_apache () {
+ # bugfix for apache2-cn postinst
mkdir -p /etc/apache2
touch /etc/apache2/httpd.conf
pkgadd apache2 squirrelmail apache2-cn squirrelmail-cn
}
+# restore amavis init script
+restore_amavis_init () {
+ # remove diversion
+ if [ -L /etc/init.d/amavis -a -f /etc/init.d/amavis.amavisd-new ]; then
+ rm -f /etc/init.d/amavis
+ dpkg-divert --remove --package amavis-cn --rename /etc/init.d/amavis --quiet
+ fi
+}
+
# instaliraj zadnji freeradius; uvjeti u queue fileovima
install_freeradius () {
pkgadd --force-yes freeradius-cn freeradius=1.0.5-0 freeradius-ldap=1.0.5-0