Commit Graph

10 Commits

Author SHA1 Message Date
Nils Schneider
1097fadc92 gluon-config-mode: correct hostname on reboot.html
Display the correct hostname on the final page of configmode.
Previously, this page used to simply call luci.sys.hostname() which
would return the current hostname. However, when the configmode changes
the hostname luci.sys.hostname() will not reflect this. This patch
fetches the hostname directly from the UCI system config.

This adds a variable called 'hostname' which may be used in site.conf at
config_mode.msg_reboot and .msg_pubkey.
2014-01-28 03:16:56 +01:00
Nils Schneider
1e348ddd45 gluon-config-mode: delay reboot a little
The reboot page should be delayed a little to give the browser time for
fetching assets (like the stylesheet). This adds a two second delay.
Unfortunately, I couldn't think of a sane way to do this within a luci
controller.

This patch forks the process. The parent will continue rendering the
page for the browser while the child will sleep and then reboot the
device. For this to work reliable the child needs to close stdout before
sleeping so the webserver closes the connection to the browser. This,
again, required a hack as lua does not allow closing std filehandles,
when prevented using luci.reboot() which was calling os.execute() and
that function will not work with stdout closed.
2014-01-23 00:04:14 +01:00
Nils Schneider
a299a150b6 gluon-config-mode: fix indentation 2014-01-22 23:18:46 +01:00
Nils Schneider
71b8be79f4 gluon-config-mode: rename config-mode to gluon-config-mode 2013-10-02 22:56:51 +02:00
Nils Schneider
cf6c51ee5e gluon-config-mode: rename configmode to config-mode (except in lua variables where it is still called configmode) 2013-10-02 15:24:14 +02:00
Nils Schneider
663b419cd5 configmode: read pubkey message from site configuration 2013-09-30 00:55:38 +02:00
Nils Schneider
1666df3cbf configmode: initscript takes care of enabled-flag 2013-09-30 00:12:21 +02:00
Nils Schneider
8476bf5a2b configmode: remove tab "Wizard" in basic mode 2013-09-29 22:06:03 +02:00
Nils Schneider
c19b4efd05 new basic configmode 2013-09-28 23:33:12 +02:00
Matthias Schiffer
d9902c0664 Adjustments for the Gluon project 2013-01-30 21:32:50 +01:00