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