File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / scripts / rc1 / xntp
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:08:38 2012 UTC (13 years, 3 months ago) by misho
Branches: ntp, MAIN
CVS tags: v4_2_6p5p0, v4_2_6p5, HEAD
ntp 4.2.6p5

    1: #!/bin/sh
    2: 
    3: killproc() {	# kill named processes
    4: 	pid=`/usr/bin/ps -e |
    5: 		/usr/bin/grep $1 |
    6: 		/usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
    7: 	[ "$pid" != "" ] && kill $pid
    8: }
    9: 
   10: case "$1" in
   11: 'start')
   12: 	ps -e | grep xntpd > /dev/null 2>&1
   13: 	if [ $? -eq 0 ]
   14: 	then
   15: 		echo "ntp daemon already running. ntp start aborted"
   16: 		exit 0
   17: 	fi
   18: 	if [ -f /etc/inet/ntp.conf -a -x /usr/sbin/xntpd ]
   19: 	then
   20: 		/usr/sbin/xntpd -c /etc/inet/ntp.conf
   21: 	fi
   22: 	;;
   23: 'stop')
   24: 	killproc xntpd
   25: 	;;
   26: *)
   27: 	echo "Usage: /etc/init.d/xntp { start | stop }"
   28: 	;;
   29: esac

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>