# last update: 2005-07-03
#
# Konfiguracija apt-a
-! pkg apt-cn pkgadd apt-cn # 2.1.6
-pkg apt-cn lt 2.1.1 pkgadd apt-cn # 2.1.6
-pkg apt-cn ge 2.1.1 sources_list # 2.1.7 update
+true create_sources_list
true comment_force_overwrite # ruzna opcija za dpkg
pkg libpam-skey pkgrm libpam-skey
pkg skey-cn pkgrm skey-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
-pkg apache fix_mod_ssl_include
-[ -f /etc/webalizer.conf ] fix_webalizer_conf
# ovo bi trebao biti zadnji post_upgrade - spremi popis
# instaliranih servisa za koje cemo na kraju provjeriti da li rade.
! check_services check check_services preupgrade
true install_keyrings
pkg mrtg-cn post_upgrade pkgadd munin-cn
pkg mrtg-cn pkgrm mrtg mrtg-cn # zamjenjeno sa munin
-pkg postgrey pkgrm postgrey # problematican
# popravi konfiguracije koje stvaraju probleme
true restore_configs
# konacno, instalacija novih paketa
pkg openldap-aai upgrade_openldap
true upgrade first # neki paketi moraju rucno
true upgrade second # neke pakete zelimo ranije
-true dist_upgrade
-true pkgadd apt-listchanges deborphan
+true dist_upgrade # instaliraj ostatak
+pkg postgrey pkgrm postgrey # problematican
# i ostatak
true debconf_priority reset
-true add_group_proc # + restart oidentd ako treba
-pkg raidtools2 fix_etc_default_raid2
-pkg proftpd fix_proftpd_conf # + restart ako treba
-pkg aide-arms-client fix_aidexfer_conf
-pkg sendmail-cn ge 2:8.13.1-2 fix_smtp_auth
+true add_group_proc # za oidentd
pkg kernel-cn dpkg-reconfigure kernel-cn
-pkg sys-mon-cn dpkg-reconfigure sys-mon-cn
-pkg amavisd-cn dpkg-reconfigure amavisd-cn # vise ne treba?
-#true post_upgrade_do_deborphan
# ovo bi trebalo biti predzadnje na popisu
# - izvrsi sve uvjetne post_upgrade akcije
true run_post_upgrade
# samo ispravke dodane nakon 2.1-1, bez instalacije nove funckionalnosti
# uglavnom forsirani upgradei
#
-pkg carnet-tools-cn lt 2.3.1 pkgadd carnet-tools-cn # 2.1.6
-pkg sendmail-cn ge 2:8.13.1-2 fix_smtp_auth
-pkg ntp-cn lt 2:4.2.0a-11 pkgadd ntp-cn # 2.1.4
-pkg apt-cn lt 2.1.1 pkgadd apt-cn # 2.1.6
-pkg apt-cn ge 2.1.1 sources_list # 2.1.7 update
-pkg freeradius ge 2:0 && [ `dpkg --print-architecture` = sparc ] && \
- ! pkg freeradius-cn install_freeradius # 2.1.7
-pkg php4-cn lt 4:4.3.11-1 pkgadd php4-cn # 2.1.6 update
-pkg iptables-cn lt 2:1.2.11-3 pkgadd iptables-cn # 2.1.6
-pkg aide-arms-client lt 1.04-1 pkgadd aide-arms-client # 2.1.6
-pkg gnupg lt 1.4.1-1 pkgadd gnupg # 2.1.7
# 2.1-1, tj. nije ih bilo u packages_first popisu a dist-upgrade ih nije
# instalirao. To se mozda odnosi na ntp-cn, pa je za svaki slucaj dodan.
-pkg getunix pkgrm getunix # obsolete
-pkg getunix-cn pkgrm getunix-cn
-pkg freeradius-cn lt 2:1.0.1-2 install_freeradius # forsirane verzije # fix 2.1.4
-pkg carnet-tools-cn lt 2.3.1 pkgadd carnet-tools-cn # 2.1.6
-pkg ntp-cn lt 2:4.2.0a-11 pkgadd ntp-cn # 2.1.4
-pkg iptables-cn lt 2:1.2.11-3 pkgadd iptables-cn # 2.1.6
-true pkgadd apt-listchanges apt-listchanges-cn deborphan
-# i ostatak
true debconf_priority reset
true add_group_proc # + restart oidentd ako treba
-pkg raidtools2 fix_etc_default_raid2
-pkg proftpd fix_proftpd_conf # + restart ako treba
-pkg aide-arms-client fix_aidexfer_conf
-pkg sendmail-cn ge 2:8.13.1-2 fix_smtp_auth
pkg kernel-cn dpkg-reconfigure kernel-cn
-pkg sys-mon-cn dpkg-reconfigure sys-mon-cn
-pkg amavisd-cn dpkg-reconfigure amavisd-cn # vise ne treba?
-#true post_upgrade_do_deborphan
# ovo bi trebalo biti predzadnje na popisu
# - izvrsi sve uvjetne post_upgrade akcije
true run_post_upgrade
# veci broj paketa koji se ne daju upgradeati s obicnim
# apt-get upgrade se forsirano upgradea
true check_services preupgrade # spremi stanje
-pkg getunix pkgrm getunix # obsolete
-pkg getunix-cn pkgrm getunix-cn
! debconf_priority check debconf_priority set # utisaj debconf
-! pkg apt-cn pkgadd apt-cn # 2.1.6
-pkg apt-cn lt 2.1.1 pkgadd apt-cn # 2.1.6
-pkg apt-cn ge 2.1.1 sources_list # 2.1.7 update
-pkg freeradius ge 2:0 && [ `dpkg --print-architecture` = sparc ] && \
- ! pkg freeradius-cn install_freeradius # 2.1.7
-pkg freeradius-cn lt 2:1.0.1-2 install_freeradius # forsirane verzije # fix 2.1.4
-pkg bind9-cn lt 2:9.2.3-2 pkgadd bind9-cn
-pkg carnet-tools-cn lt 2.3.1 pkgadd carnet-tools-cn # 2.1.7 update
-pkg php4-cn lt 4:4.3.11-1 pkgadd php4-cn # 2.1.6 update
-pkg gcc-cn lt 2:3.3.3-1 pkgadd gcc-cn
-pkg ntp-cn lt 2:4.2.0a-11 pkgadd ntp-cn # 2.1.4
-pkg iptables-cn lt 2:1.2.11-3 pkgadd iptables-cn # 2.1.6
-pkg aide-arms-client lt 1.04-1 pkgadd aide-arms-client # 2.1.6
-pkg gnupg lt 1.4.1-1 pkgadd gnupg # 2.1.7
-true pkgadd apt-listchanges apt-listchanges-cn deborphan # 2.1.4
true debconf_priority reset # vrati debconf
-pkg raidtools2 fix_etc_default_raid2
-pkg proftpd fix_proftpd_conf # + restart ako treba
-pkg aide-arms-client fix_aidexfer_conf
-pkg sendmail-cn ge 2:8.13.1-2 fix_smtp_auth
true check_services postupgrade # za svaki slucaj
log "groupadd -g 99 proc"
# update oidentd so it uses the proc group
- if [ -x /etc/init.d/oidentd -a -f /etc/default/oidentd ];
+ if [ -x /etc/init.d/oidentd -a -f /etc/default/oidentd ]; then
check_and_sed 'OIDENT_GROUP.*proc' 's/\(OIDENT_GROUP\).*/\1=proc/' \
/etc/default/oident && /etc/init.d/oidentd restart
fi
dpkg --configure -a # try postinst again
}
-# tentatively remove obsolete option in xinetd.conf
-fix_xinetd_conf () {
- if [ -f /etc/xinetd.conf ]; then
- check_and_sed 'log_on_failure.*RECORD' \
- 's/\(log_on_failure.*\)RECORD/\1/g' \
- /etc/xinetd.conf || true
- fi
-}
-
-# temporarily disable mod_ssl.conf in apache so that upgrade works
-fix_mod_ssl_include() {
- if [ -f /etc/apache/mod_ssl.conf ]; then
- check_and_sed '^Include /etc/apache/mod_ssl\.conf' \
- 's,\(^Include[ ][ ]*/etc/apache/mod_ssl\.conf\),#\1,' \
- /etc/apache/httpd.conf || true
- fi
-}
-
-fix_proftpd_conf() {
- if [ -f /etc/proftpd.conf ]; then
- check_and_sed '^LsDefaultOptions' \
- 's,^LsDefaultOptions,ListOptions,' \
- /etc/proftpd.conf || true
- fi
- [ -x /etc/init.d/proftpd ] && /etc/init.d/proftpd restart || true
-}
-
# fix /etc/dpkg/dpkg.cfg
comment_force_overwrite () {
if [ -f /etc/dpkg/dpkg.cfg ]; then
fi
}
-fix_aidexfer_conf() {
- if [ -f /etc/aide/aidexfer.conf ]; then
- check_and_sed '/usr/local/lib/aidexfer' \
- 's,/usr/local/lib/aidexfer,/usr/share/aidexfer,' \
- /etc/aide/aidexfer.conf || true
- fi
-}
-
fix_issue () {
cat > /etc/issue <<EOF
Debian GNU/Linux 4.0 (CARNet Debian 4.0) \\n \\l
exit 1
fi
}
-
-fix_webalizer_conf () {
- if [ -f /etc/webalizer.conf ]; then
- check_and_sed '^/' \
- 's,^/,#,' \
- /etc/webalizer.conf || true
- fi
-}
-
-# like in sendmail-cn
-fix_smtp_auth() {
- local tmpl conf tmpldir confdir mv_in_sasl
-
- # all of these should be installed after dist-upgrade
- # if we had SMTP AUTH previously
- if pkg sasl2-bin && pkg sasl-bin && pkg sendmail-cn ge 2:8.13.1-2; then
- :
- else
- return 0
- fi
-
- tmpldir=/usr/share/sendmail/examples/sasl
- tmpl=$tmpldir/Sendmail.conf.2
- confdir=/etc/mail/sasl
- conf=$confdir/Sendmail.conf.2
- if [ "$(sasldblistusers | wc -l)" -gt 0 ]; then
- if [ "$(sasldblistusers2 | wc -l)" -eq 0 ]; then
- echo | sasldbconverter2 /etc/sasldb
- log "Converted /etc/sasldb to /etc/sasldb2."
- else
- log "Found users in both /etc/sasldb and /etc/sasldb2, doing nothing!"
- fi
- fi
- if [ -f $conf -a -f $tmpl ] && \
- ! cmp -s $conf $tmpl; then
- mv $conf $conf.cn4-upgrade
- mv_in_sasl=1
- fi
- if [ -f $confdir/Sendmail.conf ]; then
- mv $confdir/Sendmail.conf $confdir/Sendmail.conf.cn4-upgrade
- mv_in_sasl=1
- fi
- if [ -f $confdir/sasl.m4 ] && \
- ! cmp -s $confdir/sasl.m4 $tmpldir/sasl.m4; then
- mv -f $confdir/sasl.m4 $confdir/sasl.m4.cn4-upgrade
- mv_in_sasl=1
- fi
- [ "$mv_in_sasl" ] && \
- log "Renamed old files in $confdir."
-
- # Regenerate sasl.m4 and friends.
- /usr/share/sendmail/update_auth | egrep '^(Created template)' || true
-
- # Hope noone else uses this file. (see doc/sendmail/README.Debian.gz)
- dpkg-statoverride --remove /etc/sasldb2
- dpkg-statoverride --update --add smmta smmsp 660 /etc/sasldb2
- # needed for PLAIN, LOGIN
- dpkg-statoverride --remove /var/run/saslauthd
- dpkg-statoverride --update --add root sasl 711 /var/run/saslauthd
-
- # Enable saslauthd, used by default Debian config
- if ! egrep -q '^START=yes' /etc/default/saslauthd; then
- check_and_sed START 's/#\ +START=yes$/START=yes/' /etc/default/saslauthd
- /etc/init.d/saslauthd restart
- fi
-
- /etc/init.d/sendmail reload || true
-}
-
-sources_list() {
- if [ ! -e /var/lib/carnet-upgrade/stamp-sources_list ]; then
- install-carnet-sources.list
- apt-get -y update
- touch /var/lib/carnet-upgrade/stamp-sources_list
- fi
-}
<akcija> moze biti:
- main
izvrsava potpunu proceduru za upgrade sa CARNet Debian 2.x (sarge)
- na CARNet Debian 3.x (etch) distribuciju. Ovo je pretpostavljena
+ na CARNet Debian 4.x (etch) distribuciju. Ovo je pretpostavljena
vrijednost.
- post_upgrade
nakon apt-get dist-upgrade.
- etch
- izvrsava akcije podobne za CARNet Debian 3.x (etch) instalaciju.
+ izvrsava akcije podobne za CARNet Debian 4.x (etch) instalaciju.
- new
izvrsava samo akcije koje su dodane u ovoj inacici.