mirror of https://github.com/apache/cloudstack.git
Always enter chap-secrets as a quoted field. In the event of special characters it creates and deletes the entry properly, in the event there are not special characters there is no change behavior.
Signed-off-by: Remi Bergsma <apache@remi.nl> This closes #307
This commit is contained in:
parent
ce9014d2ec
commit
646e0d99dd
|
|
@ -170,11 +170,11 @@ add_l2tp_ipsec_user() {
|
|||
local u=$1
|
||||
local passwd=$2
|
||||
|
||||
uptodate=$(grep "^$u \* $passwd \*$" /etc/ppp/chap-secrets)
|
||||
uptodate=$(grep "^$u \* \"$passwd\" \*$" /etc/ppp/chap-secrets)
|
||||
if [ "$uptodate" == "" ]
|
||||
then
|
||||
remove_l2tp_ipsec_user $u
|
||||
echo "$u * $passwd *" >> /etc/ppp/chap-secrets
|
||||
echo "$u * \"$passwd\" *" >> /etc/ppp/chap-secrets
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue