From b98f78b1c15f1593b508c58fc9a34f90b1e58081 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 31 May 2016 14:47:30 +0200 Subject: 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 --- package/base-files/files/bin/board_detect | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'package/base-files/files/bin/board_detect') diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect index ee04b9e64d..beb7f4e659 100755 --- a/package/base-files/files/bin/board_detect +++ b/package/base-files/files/bin/board_detect @@ -8,7 +8,5 @@ } [ -f "/etc/board.json" ] || return 1 -[ -f "/etc/config/network" ] || { - touch /etc/config/network - /bin/config_generate -} + +/bin/config_generate -- cgit v1.2.3