Merge pull request #719 from openNDS/11.0.0beta

11.0.0beta
This commit is contained in:
Rob White
2025-12-01 10:36:32 +00:00
committed by GitHub
4 changed files with 13 additions and 2 deletions

View File

@@ -2220,6 +2220,12 @@ get_quotas_by_mac() {
# #
#########################################
formatcheck=$(cat /etc/config/opennds | grep -q -w "config opennds 'setup'"; echo $?)
if [ "$formatcheck" -eq 1 ]; then
exit 1
fi
querystr="$1"
query_type=${querystr:0:9}

View File

@@ -504,11 +504,16 @@ int get_option_from_config(char* msg, int msg_len, const char *option)
safe_snprintf(cmd, SMALL_BUF, "/usr/lib/opennds/libopennds.sh get_option_from_config '%s'", option);
if (execute_ret_url_encoded(msg, msg_len - 1, cmd) != 0) {
debug(LOG_INFO, "Failed to get option [%s] - retrying", option);
openlog ("opennds", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_DAEMON);
syslog (LOG_ERR, "Failed to get option [%s] - retrying\n", VERSION);
closelog ();
sleep(1);
if (execute_ret_url_encoded(msg, msg_len - 1, cmd) != 0) {
debug(LOG_INFO, "Failed to get option [%s] - giving up", option);
openlog ("opennds", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_DAEMON);
syslog (LOG_CRIT, "Failed to get option [%s] Bad library or invalid config format - exiting\n", VERSION);
closelog ();
exit(1);
}
}