show first 3 nameservers

This commit is contained in:
2017-11-24 12:26:51 +01:00
parent 65e43848e6
commit 5628382a5d

View File

@@ -56,13 +56,13 @@ function check_svn {
# NAMESERVER STATUS
function check_ns {
FIRSTNS=$(grep -m1 "^nameserver" /etc/resolv.conf | cut -d" " -f2) # first nameserver in /etc/resolv.conf
NS=$(grep -m3 "^nameserver" /etc/resolv.conf | cut -d" " -f2 | paste -sd',') # first nameserver in /etc/resolv.conf
if [ "$var_ns" == "" ]; then # var_ns is only set with status-interaction.sh, no default value in config.cfg
OUT="$OUT;ns=default"
else
OUT="$OUT;ns=$var_ns"
fi
TOOL="$TOOL;ns=$FIRSTNS..."
TOOL="$TOOL;ns=$NS"
}