From 4b397553bf9edef3c4880cbb5beec8252618238f Mon Sep 17 00:00:00 2001 From: sjing Date: Wed, 11 May 2011 08:03:51 +0000 Subject: [PATCH] support ddns as the default dnshandler. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9559 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index e3783580e..ab0e66743 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -973,6 +973,7 @@ sub initDB $chtabcmds .= "$::XCATROOT/sbin/chtab key=db2installloc site.value=\/mntdb2;"; $chtabcmds .= "$::XCATROOT/sbin/chtab key=databaseloc site.value=\/var\/lib;"; $chtabcmds .= "$::XCATROOT/sbin/chtab key=sshbetweennodes site.value=ALLGROUPS;"; + $chtabcmds .= "$::XCATROOT/sbin/chtab key=dnshandler site.value=ddns;"; if ($::osname eq 'AIX') { @@ -1214,6 +1215,24 @@ sub initDB verbose("Removed xcatdefaults."); } + # switch from bind.pm to ddns.pm + # give a warning message for the first time + my $cmds = "$::XCATROOT/sbin/tabdump site|grep dnshandler"; + $outref = xCAT::Utils->runcmd("$cmds", -1); + if ($::RUNCMD_RC != 0) + { + # set site.dnshandler + $cmds = "$::XCATROOT/sbin/chtab key=dnshandler site.value=ddns;"; + $outref = xCAT::Utils->runcmd("$cmds", 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message('E',"Could not set ddns as dnshandler."); + } + else + { + xCAT::MsgUtils->message('I',"xCAT uses Dynamic DNS instead of BIND. If you want to keep the existing DNS settings made by xCAT BIND, then you should not run \"makedns\" commands. If you want to use the Dynamic DNS feature then you must run \"makedns -n\" to refresh the DNS settings."); + } + } } } # end initial DB install setup