base-files: rework config generation logic
[openwrt/openwrt.git] / package / base-files / files / bin / board_detect
index ddd17a16337d1159cc05fda4d6ce1c7a0dd34e75..beb7f4e6596584d0a423a88a168ec264b4b44008 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] || {
+[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] && {
        for a in `ls /etc/board.d/*`; do
                [ -x $a ] || continue;
                $(. $a)
@@ -8,7 +8,5 @@
 }
 
 [ -f "/etc/board.json" ] || return 1
-[ -f "/etc/config/network" ] || {
-       touch /etc/config/network
-       /bin/config_generate
-}
+
+/bin/config_generate