mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
b98f78b1c1
Now that config_generate is able to generate the entire /etc/config/system from scratch we can apply the same logic as used for /etc/config/network; when the configuration file exists already then do not do anything, else generate it from the values provided by /etc/board.json . In order to facilitate that move the file existance checking inside /bin/config_generate and call it unconditionally from /bin/board_detect. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
13 lines
202 B
Bash
Executable File
13 lines
202 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] && {
|
|
for a in `ls /etc/board.d/*`; do
|
|
[ -x $a ] || continue;
|
|
$(. $a)
|
|
done
|
|
}
|
|
|
|
[ -f "/etc/board.json" ] || return 1
|
|
|
|
/bin/config_generate
|