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

ffac-eol-ssid: add migration for ffmuc-eol-ssid #52

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ffac-eol-ssid/luasrc/lib/gluon/upgrade/950-eol-ssid-nagger
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ if uci:get('eol-wifi', 'ssid') ~= nil then
os.remove('/etc/config/eol-wifi')
end

-- migrate ffmuc-eol-ssid configuration
if uci:get('ffmuc', 'eol_ssid') then
local ffmuc_ssid_enabled = true
if uci:get('ffmuc', 'eol_ssid', 'enabled') ~= nil then
ffmuc_ssid_enabled = uci:get_bool('ffmuc', 'eol_ssid', 'enabled')
end
uci:set('eol-ssid', 'settings', 'enabled', ffmuc_ssid_enabled)
uci:save('eol-ssid')
uci:delete('ffmuc', 'eol_ssid')
uci:save('ffmuc')
end

if not site.eol_ssid.enabled(false) -- disabled for site/domain
or uci:get('eol-ssid', 'settings', 'enabled') == 0 -- present & disabled on router
then
Expand Down