summaryrefslogtreecommitdiffstats
path: root/contrib/hyperv/tools/scripts/hv_get_dns_info
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-09-26 02:30:47 +0000
committergjb <gjb@FreeBSD.org>2014-09-26 02:30:47 +0000
commitd7f74356449e59ba511e94714ccff7ee2f7219ff (patch)
tree28a75f09346b1f6fc8d967dc567ff8bd8644ca7e /contrib/hyperv/tools/scripts/hv_get_dns_info
parent8c4f6ee128c206b479ac27824a2f8c5ceede92db (diff)
downloadFreeBSD-src-d7f74356449e59ba511e94714ccff7ee2f7219ff.zip
FreeBSD-src-d7f74356449e59ba511e94714ccff7ee2f7219ff.tar.gz
Revert r272149, which introduces obscure vestiges from the
r272128 reversal. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/hyperv/tools/scripts/hv_get_dns_info')
-rw-r--r--contrib/hyperv/tools/scripts/hv_get_dns_info12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/hyperv/tools/scripts/hv_get_dns_info b/contrib/hyperv/tools/scripts/hv_get_dns_info
new file mode 100644
index 0000000..7a34440
--- /dev/null
+++ b/contrib/hyperv/tools/scripts/hv_get_dns_info
@@ -0,0 +1,12 @@
+#!/bin/sh
+# This script parses /etc/resolv.conf to retrive DNS information.
+# Khe kvp daemon code invokes this external script to gather
+# DNS information.
+# This script is expected to print the nameserver values to stdout.
+
+#if test -r /etc/resolv.conf
+#then
+# awk -- '/^nameserver/ { print $2 }' /etc/resolv.conf
+#fi
+cat /etc/resolv.conf 2>/dev/null | awk '/^nameserver/ { print $2 }'
+
OpenPOWER on IntegriCloud