I added some debug output,
(logs output to /tmp/lime-config.log on firstboot run)
and most importantly basic error handling to lime-config,
so that the whole script does not die if
a single module has a bug. Example result:
root@LiMeNode-ee01b4:/# cat /tmp/lime-config.log
Configuring LiMe for first boot...
Clearing wireless config...
Clearing network config...
Disabling odhcpd
Cleaning dnsmasq
Disabling 6relayd...
Adding macvlan interface to uci network...
Clearing bmx6 config...
/usr/lib/lua/lime/network.lua:17: 2
stack traceback:
/usr/lib/lua/lime/network.lua:142: in function
</usr/lib/lua/lime/network.lua:142>
[C]: in function 'assert'
/usr/lib/lua/lime/network.lua:17: in function 'get_mac'
/usr/lib/lua/lime/proto/batadv.lua:29: in function 'setup_interface'
/usr/lib/lua/lime/network.lua:141: in function
</usr/lib/lua/lime/network.lua:141>
[C]: in function 'xpcall'
/usr/lib/lua/lime/network.lua:141: in function
</usr/lib/lua/lime/network.lua:110>
[C]: in function 'xpcall'
/usr/bin/lime-config:17: in function 'main'
/usr/bin/lime-config:21: in main chunk
[C]: ?
/usr/lib/lua/lime/network.lua:17: 2
stack traceback:
/usr/lib/lua/lime/network.lua:142: in function
</usr/lib/lua/lime/network.lua:142>
[C]: in function 'assert'
/usr/lib/lua/lime/network.lua:17: in function 'get_mac'
/usr/lib/lua/lime/proto/batadv.lua:29: in function 'setup_interface'
/usr/lib/lua/lime/network.lua:141: in function
</usr/lib/lua/lime/network.lua:141>
[C]: in function 'xpcall'
/usr/lib/lua/lime/network.lua:141: in function
</usr/lib/lua/lime/network.lua:110>
[C]: in function 'xpcall'
/usr/bin/lime-config:17: in function 'main'
/usr/bin/lime-config:21: in main chunk
[C]: ?
Configuring system...
Let uhttpd listen on IPv4/IPv6
###### uci changes generated by lime-config run: ######
batman-adv.bat0=mesh
batman-adv.bat0.bridge_loop_avoidance=1
batman-adv.bat0.multicast_mode=0
batman-adv.bat0.distributed_arp_table=0
bmx6.general=bmx6
[...]
in this particular case, the errors are due to trying to get network.get_mac from a
wlan0_ap interface which doesn't exist yet on firstboot.
So, this new debug possibility is already proving veeery useful :)
will push this branch in a bit, after rebasing and tidying things up