aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/bin/board_detect
Commit message (Collapse)AuthorAgeFilesLines
* base-files: replace backticks by $(...)Adrian Schmutzler2020-07-111-1/+1
| | | | | | | | | This replaces deprecated backticks by more versatile $(...) syntax. This does not touch lib/upgrade/nand.sh, as there replacement is not trivial. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: also generate configs when current is empty (FS#193)Koen Vandeputte2016-10-051-2/+2
| | | | | | | | | | | | | | | Before a configuration is generated, an empty file is created to store it in. (required by UCI) If something happens during config generation (power cut, interruption, ..) an empty file exists and it is never regenerated again, causing some daemons to fail starting (NTPD, logread, ..) Fix this by also generating new configs if a critical file is empty. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* base-files: board_detect: allow specifying the generated fileJonas Gorski2016-08-131-2/+6
| | | | | | | Allow passing a filename to change the location of the generated board.json. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: let config_generate call board_detectJonas Gorski2016-08-131-2/+0
| | | | | | | 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@gmail.com>
* base-files: rework config generation logicJo-Philipp Wich2016-06-081-4/+2
| | | | | | | | | | | | 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>
* base-files: fix inverse logic in board_detect scriptJohn Crispin2014-08-191-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42220
* base-files: add a hardware detection layerJohn Crispin2014-08-181-0/+14
this allows targets to use the new uci-default helper which will generate a file called /etc/board.json. a tool called /bin/config_generate can then be used to generate the default uci settings. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42185