PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/contrib/ntp/html/build/hints/solaris.xtra.S99ntpd

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