1258945Sroberto#!/bin/sh
2258945Srobertoif [ $1 = "start" ]; then
3258945Sroberto        if [ -x /usr/local/bin/xntpd ]; then
4258945Sroberto                echo "Starting NTP daemon, takes about 1 minute... "
5258945Sroberto		# dosynctodr may need to be left alone as of with Solaris 2.6
6258945Sroberto		# The following line is unnecessary if you turn off 
7258945Sroberto		# dosynctodr in /etc/system.
8258945Sroberto                /usr/local/bin/tickadj -s  
9258945Sroberto                /usr/local/bin/ntpdate -v server1 server2
10258945Sroberto                sleep 5
11258945Sroberto                /usr/local/bin/xntpd
12258945Sroberto        fi
13258945Srobertoelse
14258945Sroberto        if [ $1 = "stop" ]; then
15258945Sroberto                pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`   
16258945Sroberto                if [ "${pid}" != "" ]; then
17258945Sroberto                        echo "Stopping Network Time Protocol daemon "
18258945Sroberto                        /usr/bin/kill ${pid}
19258945Sroberto                fi     
20258945Sroberto        fi
21258945Srobertofi
22