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

Error in first run of migrate-wifi-bands-cfg #945

Closed
ilario opened this issue Nov 6, 2022 · 1 comment · Fixed by #947
Closed

Error in first run of migrate-wifi-bands-cfg #945

ilario opened this issue Nov 6, 2022 · 1 comment · Fixed by #947
Assignees

Comments

@ilario
Copy link
Member

ilario commented Nov 6, 2022

When installing lime-system via opkg on a clean OpenWrt system, this error is printed:

Configuring lime-system.
/usr/bin/lua: /usr/bin/migrate-wifi-bands-cfg:38: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
	[C]: in function 'pairs'
	/usr/bin/migrate-wifi-bands-cfg:38: in function 'move_restof_to_specific_band'
	/usr/bin/migrate-wifi-bands-cfg:51: in function 'migrate_file'
	/usr/bin/migrate-wifi-bands-cfg:59: in main chunk
	[C]: ?

this happens as at the first install there is no lime-community nor lime-node files and this list is empty:

local uci_files = { config.UCI_COMMUNITY_NAME, config.UCI_NODE_NAME }

So there should a check for the options variable to not be nil between these lines:

local options = uci:get_all(file_name, 'wifi')
for key, value in pairs(options) do

@germanferrero
Copy link
Member

germanferrero commented Nov 7, 2022 via email

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

Successfully merging a pull request may close this issue.

2 participants