diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 659abf002..dc288454b 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -42,13 +42,6 @@ $::INSTALLDIR = "/install"; # Default TFTP dir location $::TFTPDIR = "/tftpboot"; -if ((xCAT::Utils->isServiceNode())) { # if not on Management Node - xCAT::MsgUtils->message( - 'E', - "xcatconfig should only be run on the Management Node." - ); - exit 1; -} # parse the options if ( @@ -123,6 +116,14 @@ if (($::INITIALINSTALL) && ($::UPDATEINSTALL)) xCAT::MsgUtils->message("N", $warning); exit 1; } +#If not asking to install and you are on the servicenode, then error +if (!($::INITIALINSTALL) && (xCAT::Utils->isServiceNode())) { + xCAT::MsgUtils->message( + 'E', + "xcatconfig should only be run on the Management Node." + ); + exit 1; +} # # Display command