Add check before calling rmitab for xcatd.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5576 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2010-03-24 15:15:08 +00:00
parent 6f3159c2dd
commit 89c458d8e9

View File

@ -280,9 +280,19 @@ if ($::INITIALINSTALL || $::FORCE || $::UPDATEINSTALL)
system($mkssys_cmd);
use strict;
# for AIX systems add xcatd to the /etc/inittab file
my $rmitab_cmd = "rmitab xcatd";
system($rmitab_cmd);
#
# for AIX systems add xcatd to the /etc/inittab file
#
# first remove any existing xcatd entry
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);
}
# 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);