aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/files/ntpd-hotplug
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-01-01 12:45:48 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-02-08 00:57:14 +0000
commit29a6a71d52738af9552bd77763f10e912a7eb9f0 (patch)
treee1ed3998e4eaecaebd4c6911dd368b3dd3756de9 /package/utils/busybox/files/ntpd-hotplug
parent3010f16f44e20127816817d708dbe8d26657c0fd (diff)
downloadupstream-29a6a71d52738af9552bd77763f10e912a7eb9f0.tar.gz
upstream-29a6a71d52738af9552bd77763f10e912a7eb9f0.tar.bz2
upstream-29a6a71d52738af9552bd77763f10e912a7eb9f0.zip
busybox: sysntpd: make use of new ubus hotplug.ntp object
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/utils/busybox/files/ntpd-hotplug')
-rwxr-xr-xpackage/utils/busybox/files/ntpd-hotplug12
1 files changed, 11 insertions, 1 deletions
diff --git a/package/utils/busybox/files/ntpd-hotplug b/package/utils/busybox/files/ntpd-hotplug
index 8d6d609166..f09f5bbb7f 100755
--- a/package/utils/busybox/files/ntpd-hotplug
+++ b/package/utils/busybox/files/ntpd-hotplug
@@ -1,2 +1,12 @@
#!/bin/sh
-ACTION="$1" /sbin/hotplug-call ntp
+
+. /usr/share/libubox/jshn.sh
+
+addenv="$( env | while read line; do echo "json_add_string \"\" \"$line\";"; done )"
+json_init
+json_add_array env
+json_add_string "" "ACTION=$1"
+eval "$addenv"
+json_close_array env
+
+ubus call hotplug.ntp call "$(json_dump)"