Changeset 2299


Ignore:
Timestamp:
Jun 26, 2013, 10:59:07 AM (6 years ago)
Author:
matthijs
Message:

luci: Fix 3G interface to not use "umtsd" configuration

This configuration file is no longer present now we are using udiald.
Since we're not actually storing anything into the configuration file,
the configuration file used didn't really matter, except that it must
exist.

Because the umtsd configuration file will still exist on upgrades, this
problem was not noticed before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/luci/modules/admin-fon/luasrc/model/cbi/fon_umts/main.lua

    r2277 r2299  
    99local uci_state = luci.model.uci.cursor_state()
    1010local event = require "luci.sys.event"
    11 
    12 
    13 -- Try to guess the user's country
    14 if not uci1:get("umtsd", "umtsd", "_country") then
    15         local aclang = luci.http.getenv("HTTP_ACCEPT_LANGUAGE") or ""
    16         aclang = aclang:match("%s*(%w%w).*") or ""
    17         aclang = pdb[aclang] and aclang or "es"
    18         uci1:set("umtsd", "umtsd", "_country", aclang)
    19         uci1:save("umtsd")
    20         uci1:commit("umtsd")
    21 end
    2211
    2312function get_udiald_output(args)
     
    3221end
    3322
    34 local m = Map("umtsd",
     23local m = Map("fon",
    3524        translate("umts_title", "UMTS Settings"))
    3625m.events = {"UMTS"}
    37 
    38 s = m:section(NamedSection, "umtsd")
    3926
    4027local devices = get_udiald_output("-q --list-devices")
     
    8168if next(devices) == nil then
    8269        m.pageaction = false
    83         s:append(Template("fon_umtsd/none"))
     70        m:append(Template("fon_umtsd/none"))
    8471else
    8572        local t = Template("fon_umtsd/device_list")
    8673        t.devices = devices
    87         s:append(t)
     74        m:append(t)
    8875end
    8976
    90 s:append(Template("fon_umtsd/menu"))
    91 s:append(Template("fon/page_reload"))
     77m:append(Template("fon_umtsd/menu"))
     78m:append(Template("fon/page_reload"))
    9279
    9380return m
Note: See TracChangeset for help on using the changeset viewer.