File: solaris.xtra.S99ntpd

package info (click to toggle)
ntp 1%3A4.2.8p12%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 32,472 kB
  • sloc: ansic: 240,078; sh: 6,859; makefile: 3,369; perl: 2,765; python: 1,486; yacc: 1,451; ruby: 817; awk: 417; sed: 47; asm: 37
file content (21 lines) | stat: -rw-r--r-- 813 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
if [ $1 = "start" ]; then
        if [ -x /usr/local/bin/xntpd ]; then
                echo "Starting NTP daemon, takes about 1 minute... "
		# dosynctodr may need to be left alone as of with Solaris 2.6
		# The following line is unnecessary if you turn off 
		# dosynctodr in /etc/system.
                /usr/local/bin/tickadj -s  
                /usr/local/bin/ntpdate -v server1 server2
                sleep 5
                /usr/local/bin/xntpd
        fi
else
        if [ $1 = "stop" ]; then
                pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`   
                if [ "${pid}" != "" ]; then
                        echo "Stopping Network Time Protocol daemon "
                        /usr/bin/kill ${pid}
                fi     
        fi
fi