Skip to content

Commit

Permalink
troubleshooting side effects related to bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
fikin committed Sep 12, 2023
1 parent 7db49c4 commit 4154be3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion lua_modules/bootstrap/lua/bootstrap.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
local modname = ...

local file, log = require("file"), require("log")

local fName = "bootstrap-sw.lua"
local fName = "bootstrap-sw.lc"
local fNameErr = "bootstrap-sw.PANIC.txt"

local function main()
package.loaded[modname] = nil

if file.exists(fName) then
log.info("running %s", fName)

Expand Down
9 changes: 5 additions & 4 deletions lua_modules/device-settings/lua/user-settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ local function main()

-- typically set hostname is based on chipID
-- until user overwrites it via web-portal for example
local hostname = "nodemcu" .. require("node").chipid()
local mac = require("wifi").ap.getmac()

fs("wifi-sta"):default("hostname", hostname):default("mac", mac):done()
fs("wifi-ap"):default("config.ssid", hostname .. "_ap"):default("mac", mac):done()
-- Superseeded by boostrap-sw module !!!
-- local hostname = "nodemcu" .. require("node").chipid()
-- local mac = require("wifi").ap.getmac()
-- fs("wifi-sta"):default("hostname", hostname):default("mac", mac):done()
-- fs("wifi-ap"):default("config.ssid", hostname .. "_ap"):default("mac", mac):done()


-- TODO add here your other hardcoded settings if you want to
Expand Down

0 comments on commit 4154be3

Please sign in to comment.