From 675f05bc085656499a8de0312a1b77aacd7f090f Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 1 Jul 2011 14:58:53 +0000 Subject: [PATCH] fix defect 3347227 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9996 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index e73a81c65..5b6157a68 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -285,19 +285,18 @@ if ($::INITIALINSTALL || $::FORCE || $::UPDATEINSTALL) # for AIX systems add xcatd to the /etc/inittab file # - # first remove any existing xcatd entry + # add xcatd entry if one does not exist my $rcmd = "/bin/cat /etc/inittab | grep 'xcatd'"; my $outref = xCAT::Utils->runcmd("$rcmd", -1); - if ($::RUNCMD_RC == 0) { - my $rmitab_cmd = "rmitab xcatd > /dev/null 2>&1"; - system($rmitab_cmd); + if ($::RUNCMD_RC != 0) { + my $mkitab_cmd = + "mkitab \"xcatd:2:once:$::XCATROOT/sbin/restartxcatd > /dev/console 2>&1\" > /dev/null 2>&1"; + xCAT::Utils->runcmd("$mkitab_cmd", 0); + if ($::RUNCMD_RC != 0) { + xCAT::MsgUtils->message('E', "Could not set up inittab."); + } } - # now create a new entry - my $mkitab_cmd = - "mkitab \"xcatd:2:once:$::XCATROOT/sbin/restartxcatd > /dev/console 2>&1\" > /dev/null 2>&1"; - my $rc = system($mkitab_cmd); - # add AIX needed exports &setupAIXexports; @@ -1655,13 +1654,11 @@ sub makenetworks my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { - xCAT::MsgUtils->message('E', - "The makenetworks command returned error: $::RUNCMD_RC."); + verbose("The makenetworks command returned error: $::RUNCMD_RC"); } else { - xCAT::MsgUtils->message('I', - "The makenetworks command was run with no error."); + verbose("The makenetworks command was run with no error."); }