[packages] ntpd
[openwrt/svn-archive/archive.git] / net / ntpd / files / ntpd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2008 OpenWrt.org
3
4 START=65
5
6 PIDFILE="/var/run/ntpd.pid"
7
8 start() {
9 # ln -sf /dev/ttyS0 /dev/gps0
10 # /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
11 stop
12 /usr/sbin/ntpd -g -p $PIDFILE
13 }
14
15 stop() {
16 [ -f "$PIDFILE" ] && kill $(cat "$PIDFILE") 2>/dev/null >/dev/null
17 }