]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dns: Rename dns_client service to dns-client
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Apr 2020 16:21:43 +0000 (19:21 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Apr 2020 10:42:00 +0000 (10:42 +0000)
This makes it consistent with all other services.

This commit also adds it to the old-set-parser, so the old service name
still works but gives a warning.

src/config/old-set-parser.c
src/dns/dns-client-settings.c

index 2b7374d516078b968f874151d43b8daedb44e162..444e0ddac445d8c7546c3223c47d11bf00ca0337 100644 (file)
@@ -773,6 +773,12 @@ bool old_settings_handle(struct config_parser_context *ctx,
                        config_parser_apply_line(ctx, CONFIG_LINE_TYPE_SECTION_BEGIN,
                                                 "protocol", "sieve");
                        return TRUE;
+               } else if (ctx->pathlen == 0 && strcmp(key, "service") == 0 &&
+                          strcmp(value, "dns_client") == 0) {
+                       obsolete(ctx, "service dns_client {} has been replaced by service dns-client { }");
+                       config_parser_apply_line(ctx, CONFIG_LINE_TYPE_SECTION_BEGIN,
+                                                "service", "dns-client");
+                       return TRUE;
                }
                break;
        case CONFIG_LINE_TYPE_SECTION_END:
index f572a7b7fb0453037670815793f43de20bfe6c3e..2bbcc15d7f0772168cb2079642e1ec2be7736d9b 100644 (file)
@@ -22,7 +22,7 @@ static buffer_t dns_client_unix_listeners_buf = {
 /* </settings checks> */
 
 struct service_settings dns_client_service_settings = {
-       .name = "dns_client",
+       .name = "dns-client",
        .protocol = "",
        .type = "",
        .executable = "dns-client",