show first 3 nameservers
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user