0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-24 22:16:14 +00:00
openwrt/package/utils/busybox/files/ntpd-hotplug
Daniel Golle 29a6a71d52 busybox: sysntpd: make use of new ubus hotplug.ntp object
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-08 00:57:14 +00:00

13 lines
265 B
Bash
Executable File

#!/bin/sh
. /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)"