[packages] ntpd: switch to new procd init script style
Signed-off-by: Peter Wagner <tripolar@gmx.at> git-svn-id: svn://svn.openwrt.org/openwrt/packages@38208 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a096ea9cdc
commit
c719e753be
@ -4,18 +4,17 @@
|
|||||||
START=65
|
START=65
|
||||||
STOP=65
|
STOP=65
|
||||||
|
|
||||||
SERVICE_USE_PID=1
|
USE_PROCD=1
|
||||||
|
|
||||||
start() {
|
start_service() {
|
||||||
# ln -sf /dev/ttyS0 /dev/gps0
|
# ln -sf /dev/ttyS0 /dev/gps0
|
||||||
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
|
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
|
||||||
user_exists ntp 123 || user_add ntp 123 123 ntp /var/lib/ntp
|
user_exists ntp 123 || user_add ntp 123 123 ntp /var/lib/ntp
|
||||||
group_exists ntp 123 || group_add ntp 123
|
group_exists ntp 123 || group_add ntp 123
|
||||||
mkdir -p /var/lib/ntp
|
mkdir -p /var/lib/ntp
|
||||||
chown -R ntp:ntp /var/lib/ntp
|
chown -R ntp:ntp /var/lib/ntp
|
||||||
service_start /sbin/ntpd -g -u ntp:ntp -p /var/run/ntpd.pid
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
procd_open_instance
|
||||||
service_stop /sbin/ntpd
|
procd_set_param command /sbin/ntpd -g -u ntp:ntp -p /var/run/ntpd.pid -n
|
||||||
|
procd_close_instance
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user