From 66e9b00567e2963edeb4daeb06db2b2fb4807615 Mon Sep 17 00:00:00 2001 From: Daniel Steglich Date: Wed, 25 Mar 2015 21:47:50 +0100 Subject: [PATCH] built in string substitution of bash shell does not work with dash. avoid this incompatibility. --- actions/dynamicdns | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/dynamicdns b/actions/dynamicdns index a75f914d7..a176a5702 100755 --- a/actions/dynamicdns +++ b/actions/dynamicdns @@ -204,11 +204,11 @@ doReadCFG() # as plinth will add them doReplaceVars() { - local url="${updateurl///${wanip}}" - url="${url///${host}}" - url="${url///${user}}" - url="${url///${pass}}" - url="${url//\'/""}" + local url=$(echo "${updateurl}" | sed "s//${wanip}/g") + url=$(echo "${url}" | sed "s//${host}/g") + url=$(echo "${url}" | sed "s//${user}/g") + url=$(echo "${url}" | sed "s//${pass}/g") + url=$(echo "${url}" | sed "s/'//g") updateurl=${url} logger "expanded update URL as ${url}" }