Add isMS routine to check if running on the management Server
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@773 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -1002,7 +1002,57 @@ sub isServiceNode | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
| #------------------------------------------------------------------------------- | ||||
|  | ||||
| =head3    isMS | ||||
| 	checks for the /etc/xCATMS file , if it exists is a Management Server | ||||
|      | ||||
|     Arguments: | ||||
|         none | ||||
|     Returns: | ||||
|         1 - localHost is ServiceNode  | ||||
|         0 - localHost is not ServiceNode  | ||||
|     Globals: | ||||
|         none | ||||
|     Error: | ||||
|         none | ||||
|     Example: | ||||
|          $return=(xCAT::Utils->isMS())  | ||||
|     Comments: | ||||
|         none | ||||
| =cut | ||||
|  | ||||
| #------------------------------------------------------------------------------- | ||||
| sub isMS | ||||
| { | ||||
|     my $value; | ||||
|     if (-e "/etc/xCATMS") | ||||
|     { | ||||
|         return 1; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
|  | ||||
| #------------------------------------------------------------------------------- | ||||
|  | ||||
| =head3   my_hexnets     | ||||
|      | ||||
|     Arguments: | ||||
|         none | ||||
|     Returns: | ||||
|     Globals: | ||||
|         none | ||||
|     Error: | ||||
|         none | ||||
|     Example: | ||||
|     Comments: | ||||
|         none | ||||
| =cut | ||||
|  | ||||
| #------------------------------------------------------------------------------- | ||||
| sub my_hexnets | ||||
| { | ||||
|     my $rethash; | ||||
|   | ||||
| @@ -146,7 +146,8 @@ if [ "$1" = "1" ]; then #Only if installing for the fist time.. | ||||
|     cp -r /root/.xcat/* /install/postscripts/.xcat | ||||
|     #Zap the almost certainly wrong pxelinux.cfg file | ||||
|     rm /tftpboot/pxelinux.cfg/default | ||||
|  | ||||
|     # make Management Server | ||||
| 	touch /etc/xCATMS | ||||
| 	# setup syslog | ||||
| 	if [ ! -r /etc/syslog.conf.XCATORIG ]; then | ||||
|     cp /etc/syslog.conf /etc/syslog.conf.XCATORIG | ||||
|   | ||||
		Reference in New Issue
	
	Block a user