Closed derFunk closed 6 years ago
This line does not work when the variable value contains an equals sign, like ALF_32=ldap.synchronization.groupSearchBase=OU\=Application,OU\=Groups:
ALF_32=ldap.synchronization.groupSearchBase=OU\=Application,OU\=Groups
https://github.com/pdubois/docker-alfresco/blob/b70a1e36afa6f9ce16e09a6cb45e7515c2b69839/tuneglobal.sh#L20
The output is: varvalue:OU. Expected: varvalue:OU\=Application,OU\=Groups. Reason: printf "${!val}" | awk -F "\.EQ\.|=" '{print $2}' splits the line by equal signs and takes the second column's value, which in this case is OU.
varvalue:OU
varvalue:OU\=Application,OU\=Groups
printf "${!val}" | awk -F "\.EQ\.|=" '{print $2}'
OU
Instead this (Line 20):
varvalue=`printf "${!val}" | awk -F "\.EQ\.|=" '{print $2}'`
do this, which sets everything behind .EQ. as varvalue.
.EQ.
varvalue
varvalue=`echo ${!val#*'.EQ.'}`
Description
This line does not work when the variable value contains an equals sign, like
ALF_32=ldap.synchronization.groupSearchBase=OU\=Application,OU\=Groups
:https://github.com/pdubois/docker-alfresco/blob/b70a1e36afa6f9ce16e09a6cb45e7515c2b69839/tuneglobal.sh#L20
The output is:
varvalue:OU
. Expected:varvalue:OU\=Application,OU\=Groups
. Reason:printf "${!val}" | awk -F "\.EQ\.|=" '{print $2}'
splits the line by equal signs and takes the second column's value, which in this case isOU
.Working fix
Instead this (Line 20):
do this, which sets everything behind
.EQ.
asvarvalue
.