base-files: rework config generation logic
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>
This commit is contained in:
@@ -8,7 +8,5 @@
|
||||
}
|
||||
|
||||
[ -f "/etc/board.json" ] || return 1
|
||||
[ -f "/etc/config/network" ] || {
|
||||
touch /etc/config/network
|
||||
/bin/config_generate
|
||||
}
|
||||
|
||||
/bin/config_generate
|
||||
|
||||
Reference in New Issue
Block a user