Recently migrated openwrt15.05 on the new router, and after discovering the addition of the Failsafe module, the Web login prompted the following error:
/usr/lib/lua/luci/dispatcher.lua:433:failed to execute function dispatcher the target for entry '/'.
The called action terminated with a exception:
/usr/lib/lua/luci/dispatcher.lua:433:failed to execute function disp Atcher target for entry '/failsafe '.
The called action terminated with a exception:
/usr/lib/lua/luci/dispatcher.lua:433:failed to execute call dispatch Er target for entry '/failsafe/flashops '.
The called action terminated with a exception:
/usr/lib/lua/luci/controller/failsafe/failsafe.lua:91:attempt to Index upvalue ' FP ' (a nil value)
stack traceback:
[C]: in function ' assert '
/usr/lib/lua/luci/ dispatcher.lua:433:in function ' dispatch '
/usr/lib/lua/luci/dispatcher.lua:168:in function </usr/lib/lua/ Luci/dispatcher.lua:167>
Opens the/usr/lib/lua/luci/controller/failsafe/failsafe.lua file and discovers
Local FP
Luci.http.setfilehandler (
function (meta, chunk, EOF)
if not FP then
if meta and meta.name = = "Im Age ' then
fp = Io.open (image_tmp, ' W ')
end
End
if Chunk then
fp:write (chunk)
end
if EOF Then
***fp:close () * * * *
end
End
)
Here the Fp:cloase () error, so the judging conditions here to change to:
If EOF and FP then
Then test OK, in order to completely modify, open the Openwrt-15.05/openwrt/package/feeds/luci/luci-mod-failsafe/luasrc/controller/failsafe, the file in the IF EOF then determines if the condition is modified to if EOF and FP then.