From: Valentin Vidic Date: Fri, 3 Feb 2012 10:22:27 +0000 (+0100) Subject: Handle CN upgrade. X-Git-Tag: debian/6.0.2~1 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=b96e54139101f1fcf0208eb9cd08131470fdf181;p=carnet-upgrade.git Handle CN upgrade. --- diff --git a/files/etc/apt/sources.list b/files/etc/apt/sources.list.template similarity index 100% rename from files/etc/apt/sources.list rename to files/etc/apt/sources.list.template diff --git a/src/functions.sh b/src/functions.sh index f690377..fa0406b 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -500,7 +500,12 @@ install_new () { create_sources_list () { local sl sl_new sl=/etc/apt/sources.list - sl_new=/usr/share/carnet-upgrade/files/etc/apt/sources.list + sl_new=$( copy_template $sl ) + + # comment aai repository if not in use + if ! pkg srce-keyring; then + sed -i 's/^\(deb.*ftp.srce.hr\)/#\1/' $sl_new + fi # check if already installed if ! cmp $sl $sl_new >/dev/null; then @@ -516,8 +521,9 @@ create_sources_list () { `cat /etc/apt/sources.list`" fi -} + rm $sl_new +} # funkcija koja brise grupu proc remove_group_proc () { @@ -782,9 +788,14 @@ apt_listchanges () { # make a silent installation of carnet and srce keyrings install_keyrings () { - pkgadd carnet-keyring srce-keyring debian-archive-keyring + pkgadd carnet-keyring debian-archive-keyring + dpkg-reconfigure carnet-keyring debian-archive-keyring + + if pkg srce-keyring; then + pkgadd srce-keyring + dpkg-reconfigure srce-keyring + fi - dpkg-reconfigure carnet-keyring srce-keyring debian-archive-keyring apt_update }