Duplicate system. entries

After firmware upgrade or backup recover/upload
i get "duplicate" system entries:

which can be resolved via
uci delete system.system

my uci system entries:

AP01:/etc/config# uci show system
system.@system[0]=system
system.@system[0].hostname='AP01'
system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3'
system.@system[0].ttylogin='0'
system.@system[0].log_size='64'
system.@system[0].urandom_seed='0'
system.@system[0].compat_version='1.1'
system.@system[0].zonename='Europe/Vienna'
system.@system[0].log_proto='udp'
system.@system[0].conloglevel='8'
system.@system[0].cronloglevel='5'
system.ntp=timeserver
system.@led[0]=led
system.@led[0].sysfs='green:power'
system.@led[0].trigger='heartbeat'
system.@led[1]=led
system.@led[1].sysfs='green:user'
system.@led[1].trigger='heartbeat'
system.system=system
system.system.hostname='AP01'
system.system.timezone='CET-1CEST,M3.5.0,M10.5.0/3'
system.system.zonename='Europe/Vienna'

Why or how does this happen?

before or after delete ?

before.

After delete i only have @system[0] left.

my ucitrack:

config system 'system1'
	list affects 'luci_statistics'
	list affects 'dhcp'
	option exec '/etc/init.d/log reload'
	option init 'led'

Have you any of or both?

  1. Saved old settings or post upgrade installed any old backup when upgrading?
  2. Included any uci-defaults in the build?

I checked "Keep old settings" while doing (web) sysupgrade.

If it's in the backup archive ....how did it get there if i used "uci del system.system" on that AP?

and no. No uci-defaults set in sysupgrade image.

Did you run a uci commit after uci del ...?

This with a @ and ID numer is modern uci standard.

This without @ and ID numer is very old outdated uci standard.

It looks like Luci have some code to be backward compatible with old type configs and you run both types and Luci took both types and showed them?

So for long have you reused the configs between upgrades?

The only way to fix this is to forget your old configs and reset the device and make new configs.

Probably because that old system definition have no ID so you never defined what system to actually delete.

I guess i fixed it - delete types with @ in settings

I don't know how/when system.@system appeared in config.

I would guess around OpenWrt 18.06 or 19.06 maybe. You will find some old and obsolete non ID uci code here and there in the wiki but to delete them here in your case you really made the wrong choice of what to keep in to the future.

1 Like