X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=src%2Ffunctions.sh;h=ce861a3139b0a88dd518ea1e28993f6ca4060946;hb=0ded29d74f100f20d8aab848d69eb17d9a68ee40;hp=0fee7ca38ac0fa4b2ab36348633dcc205f107484;hpb=fcb98f921d1b1e4476aaa3d3c2699b95f7c4f231;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 0fee7ca..ce861a3 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -942,10 +942,10 @@ upgrade_freeradius () { 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[[:space:]]\+$password[[:space:]]\+" \ + && ! 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[[:space:]]*\)[^[:space:]]*\(.*\)/\1$password\2/" /etc/pam_radius_auth.conf + sed -i.$backup_ext "s/^\(127.0.0.1\(:[[:digit:]]\+\)\?[[:space:]]\+\)[^[:space:]]\+\(.*\)/\1$password\3/" /etc/pam_radius_auth.conf fi fi }