diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index 08e6958d76..c774d93211 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -96,7 +96,7 @@ STATIC_DESTRUCTOR_REGISTER(arg_set_domain, strv_freep); STATIC_DESTRUCTOR_REGISTER(arg_set_nta, strv_freep); COMMAND( - "resolvectl\0systemd-resolve\0", + "resolvectl\0", "Send control commands to the network name resolution manager, or\n" "resolve domain names, IPv4 and IPv6 addresses, DNS records, and services.", .man_pages = "resolvectl.1\0", @@ -3220,6 +3220,13 @@ static void help_dns_classes(void) { VERB_COMMON_HELP_AUTO_HIDDEN("resolvectl"); +COMMAND( + "systemd-resolve\0", + "This command is deprecated. Use resolvectl.1 instead.", + .man_pages = "resolvectl.1\0", + .option_namespace = "systemd-resolve", +); + static int compat_parse_argv(int argc, char *argv[], char ***remaining_args) { int r; diff --git a/test/units/TEST-74-AUX-UTILS.introspect-cli.sh b/test/units/TEST-74-AUX-UTILS.introspect-cli.sh index 1752bdc238..8e8789bd31 100755 --- a/test/units/TEST-74-AUX-UTILS.introspect-cli.sh +++ b/test/units/TEST-74-AUX-UTILS.introspect-cli.sh @@ -32,4 +32,4 @@ systemd-id128 --introspect-cli | jq -e \ # resolvectl is a multicall binary, check that both commands are described resolvectl --introspect-cli | jq -e \ - '[.commands[].names[0]] | sort == ["resolvconf", "resolvectl"]' + '[.commands[].names[0]] | sort == ["resolvconf", "resolvectl", "systemd-resolve"]'