mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
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
8625744142
commit
0c8c089177
@ -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…
x
Reference in New Issue
Block a user