Author: cyrus Date: 2014-11-28 12:41:25 +0100 (Fri, 28 Nov 2014) New Revision: 43421
Added: trunk/package/utils/busybox/files/ntpd-hotplug Modified: trunk/package/utils/busybox/Makefile trunk/package/utils/busybox/files/sysntpd Log: ntp: add hotplug class for ntp-events Based on a patch by Luiz Angelo Daros de Luca Signed-off-by: Steven Barth <[email protected]> Modified: trunk/package/utils/busybox/Makefile =================================================================== --- trunk/package/utils/busybox/Makefile 2014-11-28 01:30:37 UTC (rev 43420) +++ trunk/package/utils/busybox/Makefile 2014-11-28 11:41:25 UTC (rev 43421) @@ -9,7 +9,7 @@ PKG_NAME:=busybox PKG_VERSION:=1.22.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -116,6 +116,7 @@ $(INSTALL_BIN) ./files/cron $(1)/etc/init.d/cron $(INSTALL_BIN) ./files/telnet $(1)/etc/init.d/telnet $(INSTALL_BIN) ./files/sysntpd $(1)/etc/init.d/sysntpd + $(INSTALL_BIN) ./files/ntpd-hotplug $(1)/usr/sbin/ntpd-hotplug -rm -rf $(1)/lib64 endef Added: trunk/package/utils/busybox/files/ntpd-hotplug =================================================================== --- trunk/package/utils/busybox/files/ntpd-hotplug (rev 0) +++ trunk/package/utils/busybox/files/ntpd-hotplug 2014-11-28 11:41:25 UTC (rev 43421) @@ -0,0 +1,3 @@ +#!/bin/sh +[ "$1" = stratum ] || exit 0 +ACTION="$1" /sbin/hotplug-call ntp Property changes on: trunk/package/utils/busybox/files/ntpd-hotplug ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: trunk/package/utils/busybox/files/sysntpd =================================================================== --- trunk/package/utils/busybox/files/sysntpd 2014-11-28 01:30:37 UTC (rev 43420) +++ trunk/package/utils/busybox/files/sysntpd 2014-11-28 11:41:25 UTC (rev 43421) @@ -5,6 +5,7 @@ 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 @@ 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 _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
