f3a660e820
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8826 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
33 lines
615 B
Bash
Executable File
33 lines
615 B
Bash
Executable File
#!/bin/sh
|
|
|
|
|
|
DIRECTORY=/var/named
|
|
|
|
if [ -f /etc/SuSE-release ]; then
|
|
DIRECTORY=/var/lib/named
|
|
fi
|
|
FILE=/etc/named.conf
|
|
#unalias cp
|
|
if [ -f $FILE ]; then
|
|
cp -f $FILE ${FILE}.ORIG
|
|
fi
|
|
if [ ! -d $DIRECTORY ]; then
|
|
mkdir $DIRECTORY
|
|
fi
|
|
echo "options {
|
|
directory \"$DIRECTORY\";
|
|
dump-file \"$DIRECTORY/data/cache_dump.db\";
|
|
statistics-file \"$DIRECTORY/data/named_stats.txt\";
|
|
memstatistics-file \"$DIRECTORY/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
|
|
|