aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/files/sysntpd
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2014-11-28 11:41:25 +0000
committerSteven Barth <cyrus@openwrt.org>2014-11-28 11:41:25 +0000
commit016d6acde5984a68e1904e21fdca32053e4c0dca (patch)
tree76d5361e56c14f8ef4c8af5e34567e6327afb322 /package/utils/busybox/files/sysntpd
parentd73dc14957000f34310b4980d95f76c60a61bee6 (diff)
downloadupstream-016d6acde5984a68e1904e21fdca32053e4c0dca.tar.gz
upstream-016d6acde5984a68e1904e21fdca32053e4c0dca.tar.bz2
upstream-016d6acde5984a68e1904e21fdca32053e4c0dca.zip
ntp: add hotplug class for ntp-events
Based on a patch by Luiz Angelo Daros de Luca Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 43421
Diffstat (limited to 'package/utils/busybox/files/sysntpd')
-rwxr-xr-xpackage/utils/busybox/files/sysntpd2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
index 417addfb1c..f73bb83082 100755
--- a/package/utils/busybox/files/sysntpd
+++ b/package/utils/busybox/files/sysntpd
@@ -5,6 +5,7 @@ START=98
USE_PROCD=1
PROG=/usr/sbin/ntpd
+HOTPLUG_SCRIPT=/usr/sbin/ntpd-hotplug
validate_ntp_section() {
uci_validate_section system timeserver "${1}" \
@@ -26,6 +27,7 @@ start_service() {
procd_open_instance
procd_set_param command "$PROG" -n
[ "$enable_server" = "1" ] && procd_append_param command -l
+ [ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S "$HOTPLUG_SCRIPT"
for peer in $server; do
procd_append_param command -p $peer
done