From 1ccebf178cc28d11f751bc64067373468dfbec6d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 14 Apr 2020 19:21:43 +0300 Subject: [PATCH] dns: Rename dns_client service to dns-client 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 | 6 ++++++ src/dns/dns-client-settings.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index 2b7374d516..444e0ddac4 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -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: diff --git a/src/dns/dns-client-settings.c b/src/dns/dns-client-settings.c index f572a7b7fb..2bbcc15d7f 100644 --- a/src/dns/dns-client-settings.c +++ b/src/dns/dns-client-settings.c @@ -22,7 +22,7 @@ static buffer_t dns_client_unix_listeners_buf = { /* */ struct service_settings dns_client_service_settings = { - .name = "dns_client", + .name = "dns-client", .protocol = "", .type = "", .executable = "dns-client", -- 2.47.3