1*abb0f93cSkardel#!/bin/sh 2*abb0f93cSkardelif [ $1 = "start" ]; then 3*abb0f93cSkardel if [ -x /usr/local/bin/xntpd ]; then 4*abb0f93cSkardel echo "Starting NTP daemon, takes about 1 minute... " 5*abb0f93cSkardel # dosynctodr may need to be left alone as of with Solaris 2.6 6*abb0f93cSkardel # The following line is unnecessary if you turn off 7*abb0f93cSkardel # dosynctodr in /etc/system. 8*abb0f93cSkardel /usr/local/bin/tickadj -s 9*abb0f93cSkardel /usr/local/bin/ntpdate -v server1 server2 10*abb0f93cSkardel sleep 5 11*abb0f93cSkardel /usr/local/bin/xntpd 12*abb0f93cSkardel fi 13*abb0f93cSkardelelse 14*abb0f93cSkardel if [ $1 = "stop" ]; then 15*abb0f93cSkardel pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` 16*abb0f93cSkardel if [ "${pid}" != "" ]; then 17*abb0f93cSkardel echo "Stopping Network Time Protocol daemon " 18*abb0f93cSkardel /usr/bin/kill ${pid} 19*abb0f93cSkardel fi 20*abb0f93cSkardel fi 21*abb0f93cSkardelfi 22