rename ysfenable to ysfautolink

pull/1/head
Tom Early 5 years ago
parent 0377b67ead
commit 8148ace7a9

@ -62,21 +62,21 @@ EvaluateVar () {
WriteMemFile () { WriteMemFile () {
local file local file
file="$rcfg" file="$rcfg"
echo "# created on `date`" > $file echo "# created on `date`" > $file
[ -z ${callsign+x} ] || echo "callsign='$callsign'" >> $file [ -z ${callsign+x} ] || echo "callsign='$callsign'" >> $file
[ -z ${nummod+x} ] || echo "nummod=$nummod" >> $file [ -z ${nummod+x} ] || echo "nummod=$nummod" >> $file
[ -z ${ip4addr+x} ] || echo "ip4addr='$ip4addr'" >> $file [ -z ${ip4addr+x} ] || echo "ip4addr='$ip4addr'" >> $file
[ -z ${ip6addr+x} ] || echo "ip6addr='$ip6addr'" >> $file [ -z ${ip6addr+x} ] || echo "ip6addr='$ip6addr'" >> $file
[ -z ${tcaddress+x} ] || echo "tcaddress='$tcaddress'" >> $file [ -z ${tcaddress+x} ] || echo "tcaddress='$tcaddress'" >> $file
[ -z ${tcmodules+x} ] || echo "tcmodules='$tcmodules'" >> $file [ -z ${tcmodules+x} ] || echo "tcmodules='$tcmodules'" >> $file
[ -z ${ysfenable+x} ] || echo "ysfenable=$ysfenable" >> $file [ -z ${ysfautolink+x} ] || echo "ysfautolink=$ysfautolink" >> $file
[ -z ${ysfmodule+x} ] || echo "ysfmodule='$ysfmodule'" >> $file [ -z ${ysfmodule+x} ] || echo "ysfmodule='$ysfmodule'" >> $file
[ -z ${ysflocaldb+x} ] || echo "ysflocaldb=$ysflocaldb" >> $file [ -z ${ysflocaldb+x} ] || echo "ysflocaldb=$ysflocaldb" >> $file
[ -z ${ysfdbname+x} ] || echo "ysfdbname='$ysfdbname'" >> $file [ -z ${ysfdbname+x} ] || echo "ysfdbname='$ysfdbname'" >> $file
[ -z ${ysfdbuser+x} ] || echo "ysfdbuser='$ysfdbuser'" >> $file [ -z ${ysfdbuser+x} ] || echo "ysfdbuser='$ysfdbuser'" >> $file
[ -z ${ysfdbpw+x} ] || echo "ysfdbpw='$ysfdbpw'" >> $file [ -z ${ysfdbpw+x} ] || echo "ysfdbpw='$ysfdbpw'" >> $file
[ -z ${g3support+x} ] || echo "g3support=$g3support" >> $file [ -z ${g3support+x} ] || echo "g3support=$g3support" >> $file
[ -z ${dbsupport+x} ] || echo "dbsupport=$dbsupport" >> $file [ -z ${dbsupport+x} ] || echo "dbsupport=$dbsupport" >> $file
} }
WriteSRCHFile () { WriteSRCHFile () {
@ -103,10 +103,10 @@ WriteSRCHFile () {
fi fi
fi fi
if [[ "$callsign" == XLX* ]]; then if [[ "$callsign" == XLX* ]]; then
if [ -z ${ysfenable+x} ]; then if [ -z ${ysfautolink+x} ]; then
echo "#define YSF_AUTOLINK_ENABLE ${ysfenable_d}" >> $file echo "#define YSF_AUTOLINK_ENABLE ${ysfautolink_d}" >> $file
else else
echo "#define YSF_AUTOLINK_ENABLE ${ysfenable}" >> $file echo "#define YSF_AUTOLINK_ENABLE ${ysfautolink}" >> $file
fi fi
if [ -z ${ysfmodule+x} ]; then if [ -z ${ysfmodule+x} ]; then
echo "#define YSF_AUTOLINK_MODULE '${ysfmodule_d}'" >> $file echo "#define YSF_AUTOLINK_MODULE '${ysfmodule_d}'" >> $file
@ -264,7 +264,7 @@ ip4addr_d='none'
ip6addr_d='none' ip6addr_d='none'
tcaddress_d='none' tcaddress_d='none'
tcmodules_d='ABCDEFGHIJKLMNOPQRSTUVWXYZ' tcmodules_d='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ysfenable_d=false ysfautolink_d=false
ysfmodule_d='D' ysfmodule_d='D'
g3support_d=false g3support_d=false
dbsupport_d=false dbsupport_d=false
@ -318,9 +318,9 @@ do
if [ ! -z ${tcaddress+x} ]; then if [ ! -z ${tcaddress+x} ]; then
echo -n "tm : Transcoder Modules = "; EvaluateVar tcmodules{,_d} echo -n "tm : Transcoder Modules = "; EvaluateVar tcmodules{,_d}
fi fi
echo -n "ye : YSF Autolink Enable = "; EvaluateVar ysfenable{,_d} echo -n "ye : YSF Autolink Enable = "; EvaluateVar ysfautolink{,_d}
if [ ! -z ${ysfenable+x} ]; then if [ ! -z ${ysfautolink+x} ]; then
if [[ "$ysfenable" == true ]]; then if [[ "$ysfautolink" == true ]]; then
echo -n "ym : YSF Autolink Module = "; EvaluateVar ysfmodule{,_d} echo -n "ym : YSF Autolink Module = "; EvaluateVar ysfmodule{,_d}
fi fi
fi fi
@ -346,14 +346,14 @@ do
callsign="${value^^}" callsign="${value^^}"
callsign="${callsign:0:6}" callsign="${callsign:0:6}"
if [[ "$callsign" == XRF* ]]; then if [[ "$callsign" == XRF* ]]; then
unset tcaddress tcmodules ysflocaldb ysfdbname ysfdbuser ysfdbpw unset tcaddress tcmodules ysfautolink ysflocaldb ysfdbname ysfdbuser ysfdbpw
fi fi
elif [[ "$key" == nm* ]]; then nummod="$value" elif [[ "$key" == nm* ]]; then nummod="$value"
elif [[ "$key" == i4* ]]; then ip4addr="$value" elif [[ "$key" == i4* ]]; then ip4addr="$value"
elif [[ "$key" == i6* ]]; then ip6addr="$value" elif [[ "$key" == i6* ]]; then ip6addr="$value"
elif [[ "$key" == tc* ]]; then tcaddress="$value" elif [[ "$key" == tc* ]]; then tcaddress="$value"
elif [[ "$key" == tm* ]]; then tcmodules="${value^^}" elif [[ "$key" == tm* ]]; then tcmodules="${value^^}"
elif [[ "$key" == ye* ]]; then SetBooleanValue ysfenable "$value" elif [[ "$key" == ye* ]]; then SetBooleanValue ysfautolink "$value"
elif [[ "$key" == ym* ]]; then elif [[ "$key" == ym* ]]; then
ysfmodule="${value^^}" ysfmodule="${value^^}"
ysfmodule="${ysfmodule:0:1}" ysfmodule="${ysfmodule:0:1}"
@ -374,7 +374,7 @@ do
elif [[ "$value" == i6* ]]; then unset ip6addr elif [[ "$value" == i6* ]]; then unset ip6addr
elif [[ "$value" == tc* ]]; then unset tcaddress elif [[ "$value" == tc* ]]; then unset tcaddress
elif [[ "$value" == tm* ]]; then unset tcmodules elif [[ "$value" == tm* ]]; then unset tcmodules
elif [[ "$value" == ye* ]]; then unset ysfenable ysfmodule elif [[ "$value" == ye* ]]; then unset ysfautolink ysfmodule
elif [[ "$value" == ym* ]]; then unset ysfmodule elif [[ "$value" == ym* ]]; then unset ysfmodule
elif [[ "$value" == g3* ]]; then unset g3support elif [[ "$value" == g3* ]]; then unset g3support
elif [[ "$value" == db* ]]; then unset dbsupport elif [[ "$value" == db* ]]; then unset dbsupport

Loading…
Cancel
Save

Powered by TurnKey Linux.