CLOUDSTACK-5066: Don't remove the current VPN users when updating

If one VPN user and password is existed in current setup, then don't touch it,
otherwise would result in this user's existing connection be dropped.
This commit is contained in:
Sheng Yang 2013-11-06 15:30:09 -08:00
parent 24c0513eea
commit 27ce69fd55

View File

@ -150,8 +150,12 @@ add_l2tp_ipsec_user() {
local u=$1
local passwd=$2
uptodate=$(grep "^$u \* $passwd \*$" /etc/ppp/chap-secrets)
if [ "$uptodate" == "" ]
then
remove_l2tp_ipsec_user $u
echo "$u * $passwd *" >> /etc/ppp/chap-secrets
fi
}
rflag=