#!/bin/sh
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)sc_update_ntp	1.1	04/07/26 SMI"
#

SC_UPDATE_NTP=/usr/cluster/bin/sc_update_ntp
CLUSTERCONFFILE=/etc/inet/ntp.conf.cluster

case "$1" in
'start')
	#
	# Test if we are booting as part of a cluster.
	#
	/usr/sbin/clinfo > /dev/null 2>&1
	if [ $? = 0 ] ; then
        	if [ -x ${SC_UPDATE_NTP} ]
        	then
			[ -f $CLUSTERCONFFILE ] || exit 0
			${SC_UPDATE_NTP}
        	fi
	fi
	;;
*)
	echo "Usage: /etc/init.d/sc_update_ntp start"
	;;
esac
exit 0
