summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMichael Geddes <openwrt@frog.wheelycreek.net>2009-01-14 01:49:24 +0000
committerMichael Geddes <openwrt@frog.wheelycreek.net>2009-01-14 01:49:24 +0000
commit1317707738fc99012961a3f7f7d02bbad695a452 (patch)
tree4fac370d42fbab2548e895716f8dec965a6e7e7d
parentd5f58717c66ecd514740a9a1c4734764c409c1ce (diff)
Fix some errors related to quoting variables.
-rwxr-xr-xcontrib/package/asterisk-xip/files/uci/voicemailconf15
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/package/asterisk-xip/files/uci/voicemailconf b/contrib/package/asterisk-xip/files/uci/voicemailconf
index 83151f0b99..5a32842fd9 100755
--- a/contrib/package/asterisk-xip/files/uci/voicemailconf
+++ b/contrib/package/asterisk-xip/files/uci/voicemailconf
@@ -54,21 +54,24 @@ check_add_voicebox() {
[ -z ${voicebox_tz} ] && voicebox_tz=homeloc
[ -z ${voicebox_name} ] && voicebox_name=OpenWRT
+ logdebug 1 "Adding in order options"
for i in password name email pager ; do
eval "local value=\"\${voicebox_$i}\""
line="${line}${value},"
done
# Then add named options.
+ logdebug 2 "Adding in named options"
for i in ${voicebox_listopt} ; do
eval val=\${voicebox_$i}
- [ -z ${val} ] || append line "$i=$val" \|
+ [ -z "${val}" ] || append line "$i=$val" \|
done
+ logdebug 2 "Check for empty"
# Check if the current voicebox context has anything
- eval local cur=\${voicebox_section_$voicebox_context}
+ eval local cur="\${voicebox_section_$voicebox_context}"
# if not add it to the list of contexts used
- [ -z $cur ] && append voice_contextlist "${voicebox_context}" " "
+ [ -z "$cur" ] && append voice_contextlist "${voicebox_context}" " "
# Then add the voicebox line to the context
logdebug 4 "Add Voicebox $line to ${voicebox_context}"
@@ -124,8 +127,8 @@ handle_voicegeneral() {
handle_voicemail() {
check_add voicebox
- voicebox_context=${1%[-_]*}
- if [ ${voicebox_context} == $1 ] ; then
+ voicebox_context="${1%[-_]*}"
+ if [ "${voicebox_context}" == "$1" ] ; then
voicebox_context=default
fi
voicebox_number=${1#*[-_]}
@@ -134,7 +137,7 @@ handle_voicemail() {
zone) voicebox_tz="$2" ;;
*)
if valid_voicebox $1 $2 ; then
- eval voicebox_$1="$2"
+ eval "voicebox_$1=\"$2\""
else
logerror "Invalid voicebox option: $1"
fi