]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolvectl: Take empty string argument to clear lists in "dns", "domain" and "nta...
authorFilipe Brandenburger <filbranden@google.com>
Mon, 16 Jul 2018 22:16:37 +0000 (15:16 -0700)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Jul 2018 19:20:52 +0000 (21:20 +0200)
commit06c28aa0d83edde4fdd173ced33a646b8f7b0073
tree13efb894d118aa835d7da57e9154880aee3dc3b0
parent81d39f0d2cd63e35389df7b9ebefc3049d1a2305
resolvectl: Take empty string argument to clear lists in "dns", "domain" and "nta" options

The current CLI does not support a way to clear these lists, since without any
additional arguments, the command will list the current values.

Introduce a new way to clear the lists by passing a single '' argument to these
subcommands.

Update the man page to document this.

Tested:
  $ build/resolvectl domain eth1
  Link 3 (eth1): ~.
  $ build/resolvectl domain eth1 ''
  $ build/resolvectl domain eth1
  Link 3 (eth1):
  $ build/resolvectl domain eth1 '~.' '~example.com'
  $ build/resolvectl domain eth1
  Link 3 (eth1): ~. ~example.com
  $ build/resolvectl domain eth1 ''
  $ build/resolvectl domain eth1
  Link 3 (eth1):
  $ build/resolvectl domain eth1 '~.'
  $ build/resolvectl domain eth1
  Link 3 (eth1): ~.

And similar for "dns" and "nta".
man/resolvectl.xml
src/resolve/resolvectl.c