# IFDEF: <the ifdef bit>
# TYPE: <the config type>
# DEFAULT: <the default value>
+# DEFAULT_IF_NONE: <alternative default value>
# LOC: <location in the Config struct>
# DOC_START
# documentation goes here
} else {
$data->{"default"} = "$name $1";
}
+ } elsif ($_ =~ /^DEFAULT_IF_NONE: (.*)$/) {
+ $data->{"default"} = "$name $1";
} elsif ($_ =~ /^LOC:(.*)$/) {
$data->{"loc"} = $1;
$data->{"loc"} =~ s/^[\s\t]*//;
TYPE: acl_access
IFDEF: FOLLOW_X_FORWARDED_FOR
LOC: Config.accessList.followXFF
-DEFAULT: none
DEFAULT_IF_NONE: deny all
DOC_START
Allowing or Denying the X-Forwarded-For header to be followed to
NAME: http_access
TYPE: acl_access
LOC: Config.accessList.http
-DEFAULT: none
DEFAULT_IF_NONE: deny all
DOC_START
Allowing or Denying access based on defined access lists
NAME: icp_access
TYPE: acl_access
LOC: Config.accessList.icp
-DEFAULT: none
DEFAULT_IF_NONE: deny all
DOC_START
Allowing or Denying access to the ICP port based on defined
IFDEF: USE_HTCP
TYPE: acl_access
LOC: Config.accessList.htcp
-DEFAULT: none
DEFAULT_IF_NONE: deny all
DOC_START
Allowing or Denying access to the HTCP port based on defined
IFDEF: USE_HTCP
TYPE: acl_access
LOC: Config.accessList.htcp_clr
-DEFAULT: none
DEFAULT_IF_NONE: deny all
DOC_START
Allowing or Denying access to purge content using HTCP based
NAME: ident_lookup_access
TYPE: acl_access
IFDEF: USE_IDENT
-DEFAULT: none
DEFAULT_IF_NONE: deny all
LOC: Ident::TheConfig.identLookup
DOC_START
NAME: access_log cache_access_log
TYPE: access_log
LOC: Config.Log.accesslogs
-DEFAULT: none
DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid
DOC_START
These files log client request activities. Has a line every HTTP or
NAME: cache_log
TYPE: string
-DEFAULT: none
DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
LOC: Debug::cache_log
DOC_START
NAME: coredump_dir
TYPE: string
LOC: Config.coredump_dir
-DEFAULT: none
DEFAULT_IF_NONE: none
DOC_START
By default Squid leaves core files in the directory from where
NAME: wccp2_service
TYPE: wccp2_service
LOC: Config.Wccp2.info
-DEFAULT: none
DEFAULT_IF_NONE: standard 0
IFDEF: USE_WCCPv2
DOC_START
NAME: snmp_access
TYPE: acl_access
LOC: Config.accessList.snmp
-DEFAULT: none
DEFAULT_IF_NONE: deny all
IFDEF: SQUID_SNMP
DOC_START
TYPE: acl_access
IFDEF: ICAP_CLIENT
LOC: Adaptation::Icap::TheConfig.repeat
-DEFAULT: none
DEFAULT_IF_NONE: deny all
DOC_START
This ACL determines which retriable ICAP transactions are
TYPE: string
LOC: Config.as_whois_server
DEFAULT: whois.ra.net
-DEFAULT_IF_NONE: whois.ra.net
DOC_START
WHOIS server to query for AS numbers. NOTE: AS numbers are
queried only when Squid starts up, not for every request.
continue;
}
- if (entry->default_value == NULL) {
+ if (entry->default_value == NULL && entry->default_if_none == NULL) {
fprintf(stderr, "NO DEFAULT FOR %s\n", entry->name);
rc |= 1;
continue;
}
- assert(entry->default_value);
-
- if (entry->ifdef)
- fprintf(fp, "#if %s\n", entry->ifdef);
-
- if (strcmp(entry->default_value, "none") == 0) {
+ if (entry->default_value == NULL || strcmp(entry->default_value, "none") == 0) {
fprintf(fp, "\t/* No default for %s */\n", entry->name);
} else {
+ if (entry->ifdef)
+ fprintf(fp, "#if %s\n", entry->ifdef);
+
fprintf(fp, "\tdefault_line(\"%s %s\");\n",
entry->name,
entry->default_value);
- }
- if (entry->ifdef)
- fprintf(fp, "#endif\n");
+ if (entry->ifdef)
+ fprintf(fp, "#endif\n");
+ }
}
fprintf(fp, "\tcfg_filename = NULL;\n");