xcat-core/xCAT-server-2.0/sbin/makenamed.conf

26 lines
476 B
Plaintext
Raw Normal View History

#!/bin/sh
FILE=/etc/named.conf
#unalias cp
if [ -f $FILE ]; then
cp -f $FILE ${FILE}.ORIG
fi
echo "options {
directory \"/var/named\";
dump-file \"/var/named/data/cache_dump.db\";
statistics-file \"/var/named/data/named_stats.txt\";
memstatistics-file \"/var/named/data/named_mem_stats.txt\";
recursion yes;
forward only;
forwarders {" >$FILE
for i in $(grep "^nameserver" /etc/resolv.conf | awk '{print $2}')
do
echo " $i;"
done >>$FILE
echo " };
};" >>$FILE