check for MN before running xcatconfig also add lsxcatd policy to update path

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7956 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-10-28 13:42:16 +00:00
parent 46baee6cc7
commit 3d38e23095

View File

@ -42,6 +42,13 @@ $::INSTALLDIR = "/install";
# Default TFTP dir location
$::TFTPDIR = "/tftpboot";
if (!(xCAT::Utils->isMN())) { # if not on Management Node
xCAT::MsgUtils->message(
'E',
"xcatconfig should only be run on the Management Node."
);
exit 1;
}
# parse the options
if (
@ -1099,7 +1106,9 @@ sub initDB
# setup Management Node policy to trusted
my $chtabcmds;
$chtabcmds =
"$::XCATROOT/sbin/chtab priority=1.2 policy.name=$MNname policy.rule=trusted";
"$::XCATROOT/sbin/chtab priority=1.2 policy.name=$MNname policy.rule=trusted;";
$chtabcmds .=
"$::XCATROOT/sbin/chtab priority=2.3 policy.commands=lsxcatd policy.rule=allow;";
my $outref = xCAT::Utils->runcmd("$chtabcmds", 0);
if ($::RUNCMD_RC != 0)
{