built in string substitution of bash shell does not work with dash. avoid this incompatibility.

This commit is contained in:
Daniel Steglich 2015-03-25 21:47:50 +01:00
parent c4fa908dd7
commit 66e9b00567

View File

@ -204,11 +204,11 @@ doReadCFG()
# as plinth will add them
doReplaceVars()
{
local url="${updateurl//<Ip>/${wanip}}"
url="${url//<Domain>/${host}}"
url="${url//<User>/${user}}"
url="${url//<Pass>/${pass}}"
url="${url//\'/""}"
local url=$(echo "${updateurl}" | sed "s/<Ip>/${wanip}/g")
url=$(echo "${url}" | sed "s/<Domain>/${host}/g")
url=$(echo "${url}" | sed "s/<User>/${user}/g")
url=$(echo "${url}" | sed "s/<Pass>/${pass}/g")
url=$(echo "${url}" | sed "s/'//g")
updateurl=${url}
logger "expanded update URL as ${url}"
}