From 3d38e23095a16dcb8efbbe380ff0347b28de559d Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 28 Oct 2010 13:42:16 +0000 Subject: [PATCH] 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 --- xCAT-server/sbin/xcatconfig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 94a83cadf..746e32e37 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -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) {