1290001Sglebius#!/bin/sh
2290001Sglebiusif [ $1 = "start" ]; then
3290001Sglebius        if [ -x /usr/local/bin/xntpd ]; then
4290001Sglebius                echo "Starting NTP daemon, takes about 1 minute... "
5290001Sglebius		# dosynctodr may need to be left alone as of with Solaris 2.6
6290001Sglebius		# The following line is unnecessary if you turn off 
7290001Sglebius		# dosynctodr in /etc/system.
8290001Sglebius                /usr/local/bin/tickadj -s  
9290001Sglebius                /usr/local/bin/ntpdate -v server1 server2
10290001Sglebius                sleep 5
11290001Sglebius                /usr/local/bin/xntpd
12290001Sglebius        fi
13290001Sglebiuselse
14290001Sglebius        if [ $1 = "stop" ]; then
15290001Sglebius                pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`   
16290001Sglebius                if [ "${pid}" != "" ]; then
17290001Sglebius                        echo "Stopping Network Time Protocol daemon "
18290001Sglebius                        /usr/bin/kill ${pid}
19290001Sglebius                fi     
20290001Sglebius        fi
21290001Sglebiusfi
22