mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
24 lines
347 B
Bash
Executable file
24 lines
347 B
Bash
Executable file
#!/bin/sh
|
|
|
|
BBF_DIAG_SCRIPTS="/usr/share/bbfdm/scripts/bbf_diag"
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
|
|
case "$1" in
|
|
list)
|
|
json_init
|
|
|
|
for file in "${BBF_DIAG_SCRIPTS}"/*; do
|
|
[ -f "${file}" ] || continue
|
|
|
|
. "${file}" "${1}"
|
|
done
|
|
|
|
json_dump
|
|
;;
|
|
call)
|
|
# Read the arguments
|
|
read -r input
|
|
sh "${BBF_DIAG_SCRIPTS}/${2}" "${input}"
|
|
;;
|
|
esac
|