Skip to content

Commit 7665a38

Browse files
committed
cli: show configured name servers in 'show dns' command
Before we add proper operational support for DNS and NTP, we can at least improve on the built-in CLI commands. Issue #510 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent cc0aedf commit 7665a38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/klish-plugin-infix/xml/infix.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@
263263
</COMMAND>
264264

265265
<COMMAND name="dns" help="Show DNS (client) status">
266-
<ACTION sym="script">resolvconf -l</ACTION>
266+
<!-- Show static/configured nameservers and then all learned ones from DHCP clients -->
267+
<ACTION sym="script">cat /etc/resolv.conf.head; resolvconf -l | sed 's/#.*//; /^\s*$/d'</ACTION>
267268
</COMMAND>
268269

269270
<COMMAND name="ntp" help="Show NTP (client) status">

0 commit comments

Comments
 (0)