packages/net/ntpd/files/ntpd.init
agb f1d3fcdf55 [packages] ntpd
-Split ntpdate off of ntpd's init-script, ntpd works properly without it
 -Make ntpd start just after ntpdate (if both are installed)
 -UCI config for ntpdate may be added, but ntpdate will be retired upstream in the future


git-svn-id: svn://svn.openwrt.org/openwrt/packages@10920 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-22 23:33:19 +00:00

18 lines
319 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2008 OpenWrt.org
START=65
PIDFILE="/var/run/ntpd.pid"
start() {
# ln -sf /dev/ttyS0 /dev/gps0
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
stop
/usr/sbin/ntpd -g -p $PIDFILE
}
stop() {
[ -f "$PIDFILE" ] && kill $(cat "$PIDFILE") 2>/dev/null >/dev/null
}