X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=ce1aef8d0472a73e9d666ae60c3a85378f6576be;hb=3aa0c2486c49100544ae0904c5e6119a58e3f89e;hp=0e12ecb12ebfab26bee75a55aaa2f59ff2f94489;hpb=d0c4bd1d1ddee4d6d64ef91e3a84b46373ac5ddb;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 0e12ecb..ce1aef8 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -891,33 +891,6 @@ upgrade_amavis () { /etc/init.d/amavisd-cn restart } -# handle freerdius upgrade -upgrade_freeradius () { - local password - - pkg freeradius-aai lt 2.1.12~srce1 || return 0 - - # aai team prevents a normal upgrade - cp -av /etc/freeradius /etc/freeradius.$backup_ext - pkgrm freeradius-aai freeradius-ldap freeradius - rm -rf /etc/freeradius/certs - pkgadd freeradius-aai - - # sync localhost passwords - if pkg libpam-radius-auth && [ -f "/etc/pam_radius_auth.conf" ]; then - pkgadd libpam-radius-auth - password=$( - sed -n '/^[[:space:]]*client[[:space:]]\+localhost/,/^[[:space:]]*}/ { /^[[:space:]]*secret[[:space:]]*=[[:space:]]*\([^[:space:]]*\)/s//\1/p }' /etc/freeradius/clients.conf - ) - if [ "$password" ] \ - && ! grep -q "^127.0.0.1\(:[[:digit:]]\+\)\?[[:space:]]\+$password[[:space:]]\+" \ - /etc/pam_radius_auth.conf - then - sed -i.$backup_ext "s/^\(127.0.0.1\(:[[:digit:]]\+\)\?[[:space:]]\+\)[^[:space:]]\+\(.*\)/\1$password\3/" /etc/pam_radius_auth.conf - fi - fi -} - # handle mysql 5.0 to 5.1 upgrade upgrade_mysql () { if pkg mysql-server || pkg mysql-server-5.1; then @@ -1070,12 +1043,12 @@ check_archives_space() { fi } -# calculate the list of linux-image packages from kernel-2.6-cn dependencies +# calculate the list of linux-image packages from kernel-cn dependencies get_cn_kernels() { local cn_kernels linux_images metapkg pkg cn_kernels= - linux_images=$(apt-cache show kernel-2.6-cn | grep ^Depends: \ + linux_images=$(apt-cache show kernel-cn | grep ^Depends: \ | grep -o 'linux-image[^, ]*') for metapkg in $linux_images; do pkg=$(apt-cache show $metapkg | grep ^Depends: \ @@ -1107,10 +1080,10 @@ check_kernel_space() { log "Kernel package: $pkg" log "Kernel size: ${kernel_size}MB" - if LC_ALL=C apt-get -s install kernel-2.6-cn 2>/dev/null \ - | grep -q '^kernel-2.6-cn is already the newest version.$' + if LC_ALL=C apt-get -s install kernel-cn 2>/dev/null \ + | grep -q '^kernel-cn is already the newest version.$' then - log "Not checking free space in /: kernel-2.6-cn already installed" + log "Not checking free space in /: kernel-cn already installed" return fi