[Commotion-admin] [luci-commotion] Make post-sysupgrade redirect work properly (#196)

Josh King notifications at github.com
Fri Mar 7 19:13:54 UTC 2014


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.
You can merge this Pull Request by running:

  git pull https://github.com/opentechinstitute/luci-commotion applyreboot

Or you can view, comment on it, or merge it online at:

  https://github.com/opentechinstitute/luci-commotion/pull/196

-- Commit Summary --

  * Added patch for modifying applyreboot.htm in order to make post-sysupgrade redirect function properly.
  * Improve the applyreboot.htm patch to only use the thisnode alias in the event that settings aren't saved during flashing.

-- File Changes --

    M files/etc/uci-defaults/luci-mod-commotion (3)
    A files/usr/share/commotion/patches/applyreboot.htm.patch (17)

-- Patch Links --

https://github.com/opentechinstitute/luci-commotion/pull/196.patch
https://github.com/opentechinstitute/luci-commotion/pull/196.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/luci-commotion/pull/196
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20140307/9ecb24b6/attachment-0001.html>


More information about the Commotion-admin mailing list