diff options
Diffstat (limited to 'package/utils/busybox/files/ntpd-hotplug')
-rwxr-xr-x | package/utils/busybox/files/ntpd-hotplug | 12 |
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)" |