On 13 April 2016 at 18:54, Nemesis <neme...@ninux.org> wrote: > Hi, > > I've incurred in weird behaviour when using the import feature of the uci > tool which seems to cause duplicates when importing configuration files that > have "list" settings. > > To test this you can try to create a file in /tmp/network: > > config interface 'lan' > list ipaddr '192.168.99.1/24' > > and then import it with: > > uci import -m -f /tmp/network network > uci commit network > > then import it again: > > uci import -m -f /tmp/network network > uci commit network > > results in: > > config interface 'lan' > list ipaddr '192.168.99.1/24' > list ipaddr '192.168.99.1/24' > > two questions: > > is this intended behaviour or is it a bug? > can something like this break the configuration or OpenWRT will select just > the last one? > > Thanks > Federico
There is currently no rule against duplicate entries in list type options and there may exist a situation where values in a list are not unique to each other. So I guess the result is expected. Regards, yousong > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel