Skip to content
Snippets Groups Projects
Commit 780ccbf9 authored by Jonas Gorski's avatar Jonas Gorski
Browse files

base-files: board_detect: allow specifying the generated file


Allow passing a filename to change the location of the generated
board.json.

Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
parent e934a129
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] && { CFG=$1
[ -n "$CFG" ] || CFG=/etc/board.json
[ -d "/etc/board.d/" -a ! -f "$CFG" ] && {
for a in `ls /etc/board.d/*`; do for a in `ls /etc/board.d/*`; do
[ -x $a ] || continue; [ -x $a ] || continue;
$(. $a) $(. $a)
done done
} }
[ -f "/etc/board.json" ] || return 1 [ -f "$CFG" ] || return 1
#!/bin/ash #!/bin/ash
CFG=/etc/board.json
. /lib/functions.sh . /lib/functions.sh
. /usr/share/libubox/jshn.sh . /usr/share/libubox/jshn.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment