I recently pushed myself to attempt to run an imagebuilder image on my old TP-Link MR4320v2, since the Rooter project decided it was EOL. Got 19.03.3 to run, with extroot and all.
Attempting to automate much of the post-flash configuration, I put some customisation files in /etc/uci-defaults (using FILES in imagebuilder).
Much of it went fine, but it seems that I am unable to figure out how to set dhcp.lan.dhcp_option via uci (forcing me to vi the /etc/config/dhcp file). In my config file I have this:
config dhcp 'lan' option interface 'lan' option leasetime '12h' option start '17' option limit '254' option force '1' list dhcp_option '121,192.168.64.0/24,192.168.0.254,192.168.128.0/24,192.168.0.254,0.0.0.0/0,192.168.0.1' list dhcp_option '249,192.168.64.0/24,192.168.0.254,192.168.128.0/24,192.168.0.254,0.0.0.0/0,192.168.0.1'
and uci show says,
But how do I set this using uci? I tried with uci add_list, like
uci add_list dhcp.lan.dhcp_option '121,192.168.64.0/24,192.168.0.254,192.168.128.0/24,192.168.0.254,0.0.0.0/0,192.168.0.1' uci add_list dhcp.lan.dhcp_option '249,192.168.64.0/24,192.168.0.254,192.168.128.0/24,192.168.0.254,0.0.0.0/0,192.168.0.1'
, but when attempting to commit it says parse error. Any ideas?