[PATCH 00/11] allow loading default credentials from flash

John Crispin john at phrozen.org
Mon Sep 23 10:18:14 PDT 2024


The series adds board.d enhancements that allow loading persistently stored
values that can then be used during config_generate.

- root password
- ssh auth key
- wifi credentials
- timezone
- num_global_macaddr

There is a script that will attempt to load these values from the uboot-env. 

Daniel Golle (1):
  base-files: uci-defaults: allow setting wireless defaults

John Crispin (10):
  base-files: uci-defaults: allow setting default credentials and ssh
    keys
  base-files: uci-defaults: allow setting default timezone
  base-files: uci-defaults: allow setting the number of MACs a radio can
    use
  base-files: execute uboot-env script before calling config_generate
  uboot-envtools: add fw_loadenv tool
  uboot-envtools: add a board.d script to load defaults from the
    environment
  wifi-scripts: populate default wifi credentials and country code from
    board.json
  dropbear: add a uci-defaults script for loading authorized keys
  base-files: add timezone to UCI during config_generate
  base-files: set root password if present inside board.json

 package/base-files/files/bin/config_generate  |  5 ++
 package/base-files/files/etc/init.d/boot      |  3 +-
 .../files/etc/uci-defaults/50-root-passwd     | 15 ++++
 .../files/lib/functions/uci-defaults.sh       | 77 +++++++++++++++++++
 package/boot/uboot-envtools/Makefile          |  3 +
 package/boot/uboot-envtools/files/fw_defaults | 16 ++++
 package/boot/uboot-envtools/files/fw_loadenv  | 26 +++++++
 .../wifi-scripts/files/lib/wifi/mac80211.uc   | 22 +++++-
 package/network/services/dropbear/Makefile    |  2 +
 .../services/dropbear/files/dropbear.defaults | 15 ++++
 10 files changed, 179 insertions(+), 5 deletions(-)
 create mode 100644 package/base-files/files/etc/uci-defaults/50-root-passwd
 create mode 100644 package/boot/uboot-envtools/files/fw_defaults
 create mode 100644 package/boot/uboot-envtools/files/fw_loadenv
 create mode 100644 package/network/services/dropbear/files/dropbear.defaults

-- 
2.34.1




More information about the openwrt-devel mailing list