X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=2b4d74370bbdd1c15092ff59d8a9b4e70395134e;hb=89b053f3753b16731c1d16bf54ad60a7ac7e7786;hp=3825a4c2c96cc95bc451364311c614f85630f678;hpb=5fe31b9531df1ee2f0b14881b126b33929eb5601;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 3825a4c..2b4d743 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -2,8 +2,10 @@ # Zoran 'jelly' Dzelajlija # Zeljko Boros -PHPVER="7.3" -MDB="10.3" +PHPVER="7.4" +MDB="10.5" +PINFILE="/etc/apt/preferences.d/99-carnet" + notice () { LC_MESSAGES=hr_HR dialog --backtitle "$title" --msgbox "$*" 18 75 @@ -17,6 +19,14 @@ first_warning () { fi } +second_warning () { + LC_MESSAGES=hr_HR dialog --backtitle "$title" --yesno "$msg_second_warning" 18 75 + if [ $? -ne 0 ]; then + log "Upgrade canceled." + exit 0 + fi +} + pkg() { local version dpkg -l "$1" 2> /dev/null | egrep -q "^.i" || return 1 @@ -158,6 +168,17 @@ remove_x() { } remove_bloat() { +### zelja 2023-07-06 +tempdelfile=$(mktemp /tmp/tempdelfile.XXXX) + +for a in $bloats; do echo apt-get -qq -y remove $a 2\> /dev/null ; done > $tempdelfile + +/bin/bash $tempdelfile +rm $tempdelfile + +return 0 + + local to_remove add_this i j n text to_show cmd tmpfile installed local update_selections pkgs_to_deselect pkgs_to_remove oldifs pkglist text="$msg_remove_bloat" @@ -216,6 +237,9 @@ remove_bloat() { } remove_cn_bloat() { +### Sve obrisano u remove_bloat() +return 0 + local installed pkg cn_pkgs dialog_list selection cn_del to_del del_pkgs # get installed packages @@ -342,7 +366,7 @@ Doslo je do greske prilikom izvrsavanja akcije '$action'. Detalje problema moguc Da bi dovrsili zapocete operacije nad paketima pokrenite: # dpkg --configure -a - # apt-get -f install + # apt -f install Nakon toga ponovno pozovite carnet-upgrade skriptu." } @@ -371,7 +395,7 @@ check_upgrade () { if [ "$upgrade" ]; then notice " -Prije prelaska na Debian stretch potrebno je napraviti nadogradnju ovih paketa: +Prije prelaska na Debian bullseye potrebno je napraviti nadogradnju ovih paketa: $upgrade Pokrenite: @@ -947,11 +971,11 @@ upgrade_postfix () { fix_bacula() { echo "CN: Dodajem pinning bacule na inačicu 7.4.4..." - PINFILE=/etc/apt/preferences.d/99-carnet test -f $PINFILE || touch $PINFILE cp-update bacula-cn $PINFILE < /dev/null 2>&1 } # restore munin configs for silent upgrade