sn is now forced to uppercase and you can't write qn.cfg unless you set ircddb_login

pull/12/head
Tom Early 7 years ago
parent 8e340ca905
commit 6cf9c9755f

@ -397,7 +397,7 @@ ModuleMenu () {
elif [[ "$key" == ad* ]]; then eval ${mod}_ack_delay="$value" elif [[ "$key" == ad* ]]; then eval ${mod}_ack_delay="$value"
elif [[ "$key" == po* ]]; then eval ${mod}_power="$value" elif [[ "$key" == po* ]]; then eval ${mod}_power="$value"
elif [[ "$key" == sq* ]]; then eval ${mod}_squelch="$value" elif [[ "$key" == sq* ]]; then eval ${mod}_squelch="$value"
elif [[ "$key" == sn* ]]; then eval ${mod}_serial_number="$value" elif [[ "$key" == sn* ]]; then eval ${mod}_serial_number="${value^^}"
elif [[ "$key" == rn* ]]; then eval ${mod}_rf_on="$value" elif [[ "$key" == rn* ]]; then eval ${mod}_rf_on="$value"
elif [[ "$key" == rf* ]]; then eval ${mod}_rf_off="$value" elif [[ "$key" == rf* ]]; then eval ${mod}_rf_off="$value"
elif [[ "$key" == rl* ]]; then eval ${mod}_rx_level="$value" elif [[ "$key" == rl* ]]; then eval ${mod}_rx_level="$value"
@ -449,10 +449,15 @@ ModuleMenu () {
WriteCFGFile () { WriteCFGFile () {
local m p q outFile local m p q outFile
if [ -z "$ircddb_login" ]; then
echo "You MUST set your ircddb login callsign (in the ircddb section)!"
read -p "Press <Enter> to continue: " ans
return
fi
outFile='./qn.cfg' outFile='./qn.cfg'
echo "# Created on `date`" > $outFile echo "# Created on `date`" > $outFile
# gateway_ section # gateway_ section
echo "ircddb_login='$ircddb_login'" >> $outFile echo "ircddb_login='$ircddb_login'" >> $outFile
[ -z "${ircddb_host+x}" ] || echo "ircddb_host='${ircddb_host}'" >> $outFile [ -z "${ircddb_host+x}" ] || echo "ircddb_host='${ircddb_host}'" >> $outFile
[ -z "${ircddb_port+x}" ] || echo "ircddb_host=${ircddb_port}" >> $outFile [ -z "${ircddb_port+x}" ] || echo "ircddb_host=${ircddb_port}" >> $outFile
[ -z "${ircddb_password+x}" ] || echo "ircddb_password='${ircddb_password}'" >> $outFile [ -z "${ircddb_password+x}" ] || echo "ircddb_password='${ircddb_password}'" >> $outFile

Loading…
Cancel
Save

Powered by TurnKey Linux.