aboutsummaryrefslogtreecommitdiff
path: root/package/utils/busybox/files/ntpd-hotplug
blob: f09f5bbb7fc6bcae6f3eb6e5f41c54f4e1c42a80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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)"