xref: /freebsd/contrib/hyperv/tools/scripts/hv_get_dns_info (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1#!/bin/sh
2# This script parses /etc/resolv.conf to retrive DNS information.
3# Khe kvp daemon code invokes this external script to gather
4# DNS information.
5# This script is expected to print the nameserver values to stdout.
6
7#if test -r /etc/resolv.conf
8#then
9#	awk -- '/^nameserver/ { print $2 }' /etc/resolv.conf
10#fi
11cat /etc/resolv.conf 2>/dev/null | awk '/^nameserver/ { print $2 }'
12
13