mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
* SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. * SC2086 (info): Double quote to prevent globbing and word splitting. * SC2091 (warning): Remove surrounding $() to avoid executing output (or use eval if intentional). Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu> Link: https://github.com/openwrt/openwrt/pull/20831 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 lines
216 B
Bash
Executable file
14 lines
216 B
Bash
Executable file
#!/bin/sh
|
|
|
|
CFG=$1
|
|
|
|
[ -n "$CFG" ] || CFG=/etc/board.json
|
|
|
|
if [ -d "/etc/board.d/" ] && [ ! -s "$CFG" ]; then
|
|
for a in $(ls /etc/board.d/*); do
|
|
[ -s "$a" ] || continue
|
|
(. "$a")
|
|
done
|
|
fi
|
|
|
|
[ -s "$CFG" ] || return 1
|