From 6db9298ba3dc72329d9ae5ec7782b912ad3ab420 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Thu, 1 Nov 2012 09:20:31 +0000 Subject: [PATCH] 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 --- xCAT-server/sbin/xcatconfig | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 37340ecbb..44cc0ce6c 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -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."); } } }