Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3501 - uci option disabled value on unnamed section doesn't show #6600

Closed
openwrt-bot opened this issue Dec 9, 2020 · 4 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

zokl:

If the disabled option in the unnamed section is used in the uci configuration file, it cannot be displayed using the uci get or uci show command.

Doesn't works:

root@F:~# cat /etc/config/gps
config gps
option disabled '1'
option extended '1'
option tty '/dev/ttyUSB1'
option adjust_time '0'

root@F-Tester-508D80:~# uci show gps
gps.@gps[0]=gps
gps.@gps[0].extended='1'
gps.@gps[0].tty='/dev/ttyUSB1'
gps.@gps[0].adjust_time='0
'

Works:

root@F:~# cat /etc/config/gps
config gps 'gps'
option disabled '1'
option extended '1'
option tty '/dev/ttyUSB1'
option adjust_time '0'

root@F-Tester-508D80:~# uci show gps
gps.gps=gps
gps.gps.disabled='1'
gps.gps.extended='1'
gps.gps.tty='/dev/ttyUSB1'
gps.gps.adjust_time='0'

@openwrt-bot
Copy link
Author

jow-:

Works for me:
root@jj:~# cat < /etc/config/gps

config gps
option disabled '1'
option extended '1'
option tty '/dev/ttyUSB1'
option adjust_time '0'
EOT
root@jj:# uci show gps
gps.@gps[0]=gps
gps.@gps[0].disabled='1'
gps.@gps[0].extended='1'
gps.@gps[0].tty='/dev/ttyUSB1'
gps.@gps[0].adjust_time='0'
root@jj:
#

Maybe you have a syntax error somewhere in your config, or uncommitted staged uci changes such as in the example below:

root@jj:# uci del gps.@gps[0].disabled
root@jj:
# cat /etc/config/gps
config gps
option disabled '1'
option extended '1'
option tty '/dev/ttyUSB1'
option adjust_time '0'
root@jj:# uci show gps
gps.@gps[0]=gps
gps.@gps[0].extended='1'
gps.@gps[0].tty='/dev/ttyUSB1'
gps.@gps[0].adjust_time='0'
root@jj:
#

A uci revert gps should solve that then.

@openwrt-bot
Copy link
Author

zokl:

It is very interesting:

If I make uci revert gps, it works but after restart the system the problem is again. The same behavior if I make uci set gps.@gps[0].disabled='1' && uci commit gps it works till the restart

@openwrt-bot
Copy link
Author

zokl:

Maybe, the problem is somewhere in the system because, after a restart, I have:

root@F:~# uci changes gps -gps.cfg0177ef.disabled gps.cfg0177ef.tty='/dev/ttyUSB1' gps.cfg0177ef.adjust_time='0'

I try to make a pure installation of the system.

@openwrt-bot
Copy link
Author

zokl:

Fresh installation solved this problem. Thank you very much for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant