xcat-core/xCAT-server/sbin/makenamed.conf
lissav da78c18ee4 fix to work on AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2106 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-09-09 15:30:47 +00:00

28 lines
528 B
Bash
Executable File

#!/bin/sh
FILE=/etc/named.conf
#unalias cp
if [ -f $FILE ]; then
cp -f $FILE ${FILE}.ORIG
fi
if [ ! -d /var/named ]; then
mkdir "/var/named"
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