dns service name in ubuntu is bind9

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14197 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2012-11-01 09:20:31 +00:00
parent 66dab45eba
commit 6db9298ba3

View File

@ -2120,15 +2120,20 @@ sub startnamedonboot
else
{
#chkconfig
my $cmd = "/sbin/chkconfig named on";
my $serv = "named";
my $cmd = "/sbin/chkconfig $serv on";
if ( xCAT::Utils->osver() =~ /ubuntu.*/i){
$serv = "bind9";
$cmd = "update-rc.d $serv enable";
}
my $outref = xCAT::Utils->runcmd("$cmd", 0);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("E", "Could not enable named.");
xCAT::MsgUtils->message("E", "Could not enable $serv.");
}
else
{
xCAT::MsgUtils->message("I", "named has been enabled on boot.");
xCAT::MsgUtils->message("I", "$serv has been enabled on boot.");
}
}
}