opentechinstitute/luci-commotion — pull request #196 by jheretic (2014-03-07 19:13:53+00:00)
Title: Make post-sysupgrade redirect work properly

This adds a patch which gets applied to applyreboot.htm, the file that actually does the javascript redirect after a sysupgrade process. The patch does two things: one, it modifies the redirect path to be 'thisnode' in cases where settings aren't saved during a reflash, whereas with the default version it is '192.168.1.1.' Two, it increases the interval at which the page checks to see if the node is back up to 15 seconds instead of 5. The first interval was too short, as with SSL and the other stuff we're running, uhttpd hasn't even shut down within 5 seconds, so it redirects immediately and then breaks. 10 seconds seems just enough (uhttpd shut down in tests in about 8 seconds), but I increased it to 15 to allow time for slower or more overloaded devices.

This should fix the issue seen in https://github.com/opentechinstitute/commotion-router/issues/112

To test:
1. Run a sysupgrade through the LuCI interface on a configured node. Either keep or don't keep settings.
2. You should see the redirect page until after the flashing process is complete and the node has rebooted. Some short time after the node has finished booting up, you should automatically be redirected to its front page.