Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / scripts / rc1 / xntp
blob227b943aaa2ef6dfbe57c724ac48a7e4bb000b7e
1 #!/bin/sh
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
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
18 if [ -f /etc/inet/ntp.conf -a -x /usr/sbin/xntpd ]
19 then
20 /usr/sbin/xntpd -c /etc/inet/ntp.conf
23 'stop')
24 killproc xntpd
27 echo "Usage: /etc/init.d/xntp { start | stop }"
29 esac