There's lots of tangents going on here, lets just stick to the problem, which has been identified and I can now look at a fix.
Issue 1:
Your device not having the
section under wan_dev on firstboot. This is a problem which shouldn't be happening according to the OpenWrt code i've read in relation to your device. It should be populated at the same time as it creates the wan_dev section. This is why you're getting random MAC every time you boot.
So something is wrong at your device level or in the OpenWrt code, but this isn't something i can/will fix.
Issue 2:
When i wrote the code in March to handle this scenario, i made an assumption (based on the same code) that the macaddr option would ALWAYS be populated. As it turns out, maybe that isn't such a safe assumption.
https://github.com/ericpaulbishop/gargo ... c.js#L1563
A change needs to occur in that line. I'm not in front of a computer so i can't test, but it probably needs to change to:
Code: Select all
wanMacLoc = uciOriginal.get("network","wan_dev") != "" ? "wan_dev" : wanMacLoc;
BUT i can't test this right now.
So, I'm not touching Issue 1 (that's yours/OpenWrt's problem). I'll test and
fix Issue 2, although I do feel like I'm covering a boundary case type condition rather than fixing a real bug per se.