From b96e54139101f1fcf0208eb9cd08131470fdf181 Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Fri, 3 Feb 2012 11:22:27 +0100 Subject: [PATCH] Handle CN upgrade. --- .../etc/apt/{sources.list => sources.list.template} | 0 src/functions.sh | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) rename files/etc/apt/{sources.list => sources.list.template} (100%) 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 } -- 1.7.10.4