From 8ff27083dfa07c35d3e6e767bfda63b3348f77b9 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 7 May 2008 17:10:30 +0000 Subject: [PATCH] routine to create DNS conf file git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1309 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/sbin/makenamed.conf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 xCAT-server-2.0/sbin/makenamed.conf diff --git a/xCAT-server-2.0/sbin/makenamed.conf b/xCAT-server-2.0/sbin/makenamed.conf new file mode 100755 index 000000000..9af8609bb --- /dev/null +++ b/xCAT-server-2.0/sbin/makenamed.conf @@ -0,0 +1,23 @@ +#!/bin/sh + +FILE=/etc/named.conf + +#unalias cp +cp -f $FILE ${FILE}.ORIG + +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 +