[source] base-files: let config_generate call board_detect

LEDE Commits lede-commits at lists.infradead.org
Sat Aug 13 06:52:13 PDT 2016


jogo pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=e934a129f086435a39c663375d41367a54783b39

commit e934a129f086435a39c663375d41367a54783b39
Author: Jonas Gorski <jonas.gorski at gmail.com>
AuthorDate: Sat Aug 13 14:04:23 2016 +0200

    base-files: let config_generate call board_detect
    
    Instead of board_detect generating the config as a side effect, let
    config_generate call board_detect as needed.
    
    Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
---
 package/base-files/files/bin/board_detect    | 2 --
 package/base-files/files/bin/config_generate | 2 +-
 package/base-files/files/etc/init.d/boot     | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect
index beb7f4e..3a23381 100755
--- a/package/base-files/files/bin/board_detect
+++ b/package/base-files/files/bin/board_detect
@@ -8,5 +8,3 @@
 }
 
 [ -f "/etc/board.json" ] || return 1
-
-/bin/config_generate
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index 7f34eec..80ed61b 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -4,7 +4,7 @@ CFG=/etc/board.json
 
 . /usr/share/libubox/jshn.sh
 
-[ -f $CFG ] || exit 1
+[ -f $CFG ] || /bin/board_detect || exit 1
 [ -f /etc/config/network -a -f /etc/config/system ] && exit 0
 
 generate_static_network() {
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index 4a2010c..904f7db 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -47,7 +47,7 @@ boot() {
 	}
 	rm -f /tmp/wireless.tmp
 
-	/bin/board_detect
+	/bin/config_generate
 	uci_apply_defaults
 	
 	# temporary hack until configd exists



More information about the lede-commits mailing list