openwrt15.05 add failsafe module, Web login prompt error

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.