rename ysfenable to ysfautolink

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

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

Loading…
Cancel
Save

Powered by TurnKey Linux.