Minor changes (fix ap mode, be more informative about failed rename); update TODO.

This commit is contained in:
Wouter R 2013-06-17 20:23:00 +02:00
parent 88e3205347
commit 83167e31fe
2 changed files with 10 additions and 5 deletions

4
TODO
View File

@ -1,9 +1,13 @@
# TODO
- licensing (also for hardware and firmware) + credits
http://www.codinghorror.com/blog/2007/04/pick-a-license-any-license.html
- add more config options to package; candidates:
reconf.WWW_RENAME_NAME, wifihelper.{AP_ADDRESS, AP_NETMASK, (NET)}
about bridging this to lua: have some Makefile stage create a ini/lua file with k/v's and have lua read out that file?
https://github.com/2ion/ini.lua
- write a shellscript to automate tasks like swapping out /www and packaging modified code for git merging
- see if updating works when a new version is 'released' (probably needs a real feed)
- perhaps opkg+safeboot could be useful in the update mechanism?
- add aliases to root profile only when debugging was requested in menuconfig
- add config option to compile sources using luac?
- add dependency on either wr703n or mr3020 (and probably comment it out to avoid being to conservative...)

View File

@ -125,11 +125,11 @@ end
function reconf.staticaddr_add(dirtyList)
uci:set("network", wifi.NET, "interface")
--TODO: remove ifname on wlan interface?
--NOTE: 'type = "bridge"' should -not- be added as this prevents defining a separate dhcp pool (http://wiki.openwrt.org/doc/recipes/routedap)
M.uciTableSet("network", wifi.NET, {
proto = "static",
ipaddr = wifi.AP_ADDRESS,
netmask = wifi.AP_NETMASK,
type = "bridge",
netmask = wifi.AP_NETMASK
})
bothBits(dirtyList, "network")
end
@ -139,7 +139,7 @@ function reconf.staticaddr_rm(dirtyList)
uci:set("network", wifi.NET, "proto", "dhcp")
uci:delete("network", wifi.NET, "ipaddr")
uci:delete("network", wifi.NET, "netmask")
uci:delete("network", wifi.NET, "type")
--uci:delete("network", wifi.NET, "type") --do not remove since it is not added anymore
bothBits(dirtyList, "network")
end
@ -198,11 +198,12 @@ function reconf.wwwcaptive_add(dirtyList)
if u.exists(M.WWW_CAPTIVE_INDICATOR) then
return u:logdebug("WWW captive directory already in place, not redoing", false)
end
if os.rename("/www", M.WWW_RENAME_NAME) == true then
local rv,reason = os.rename("/www", M.WWW_RENAME_NAME)
if rv == true then
u.symlink(M.WWW_CAPTIVE_PATH, "/www")
return true
else
return u:logerror("Could not rename /www to " .. M.WWW_RENAME_NAME)
return u:logerror("Could not rename /www to " .. M.WWW_RENAME_NAME .. "(" .. reason .. ")")
end
end
function reconf.wwwcaptive_rm(dirtyList)