mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	Update setupntp for 2.0
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1390 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -1,25 +1,21 @@ | ||||
| #!/bin/ksh | ||||
| #!/bin/sh | ||||
| # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html | ||||
| #egan@us.ibm.com | ||||
| #(C)IBM Corp | ||||
| # | ||||
|  | ||||
| . $XCATROOT/lib/functions | ||||
|  | ||||
| if TIMESERVERS=$(tabdb $SITETAB timeservers 1)  | ||||
| then | ||||
| 	: | ||||
| else | ||||
| 	echo "$0: timeservers not defined in $SITETAB" | logger -t xcat | ||||
| 	exit | ||||
| #--------------------------------------------------------------------------- | ||||
| # setup NTP configuration on the compute nodes | ||||
| # | ||||
| #--------------------------------------------------------------------------- | ||||
| master=$MASTER | ||||
| conf_file="/etc/ntp.conf" | ||||
| conf_file_backup="/etc/ntp.conf.postbackup" | ||||
| # if backup does not exist, backup | ||||
| if [ !  -f $conf_file_backup ]; then | ||||
|    mv -f $conf_file $conf_file_backup | ||||
| fi | ||||
|  | ||||
| logger -t xcat "Install: Setup NTP" | ||||
|  | ||||
| for i in $(echo $TIMESERVERS | tr ',' ' ') | ||||
| do | ||||
| 	echo "server $i.$DOMAIN" | ||||
| done >/etc/ntp.conf | ||||
| echo "server $master" >$conf_file | ||||
|  | ||||
| mkdir -p /etc/ntp | ||||
| chown ntp /etc/ntp | ||||
| @@ -31,10 +27,6 @@ authenticate no | ||||
| keys		/etc/ntp/keys | ||||
| trustedkey	65535 | ||||
| requestkey	65535 | ||||
| controlkey	65535" >>/etc/ntp.conf | ||||
| controlkey	65535" >>$conf_file | ||||
|  | ||||
| for i in $(echo $TIMESERVERS | tr ',' ' ') | ||||
| do | ||||
| 	echo "$i.$DOMAIN" | ||||
| done >/etc/ntp/step-tickers | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user