0f1bbed6b9
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1789 2a923420-c742-0410-a762-8d5b09965624
59 lines
998 B
Plaintext
Executable File
59 lines
998 B
Plaintext
Executable File
#!/mod/bin/jimsh
|
|
|
|
package require cgi
|
|
source /mod/webif/lib/setup
|
|
require rsv.class system.class
|
|
|
|
httpheader
|
|
|
|
if {[cgi_get act] eq "cancel"} {
|
|
system restartpending 0
|
|
exit
|
|
}
|
|
|
|
if {[cgi_get now] eq "yes"} {
|
|
# - Busybox reboot does sync the disk but may still not be clean enough.
|
|
puts "Restarting."
|
|
system reboot
|
|
exit
|
|
}
|
|
|
|
system restartpending 0
|
|
jqplugin progressbar
|
|
header
|
|
|
|
# Commit pending reservations on older mod versions.
|
|
if {![file exists /sbin/rsvsync] && ![file exists /mod/boot/rsvsync]} {
|
|
rsv commit
|
|
}
|
|
|
|
puts {
|
|
|
|
<script type=text/javascript>
|
|
var handle = 0;
|
|
var pct = 0;
|
|
function update()
|
|
{
|
|
$('#progressbar').reportprogress(++pct);
|
|
if (pct == 100)
|
|
{
|
|
clearInterval(handle);
|
|
pct = 0;
|
|
window.location = '/';
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$('#progressbar').reportprogress(0);
|
|
handle = setInterval("update()", 350);
|
|
$.get('/cgi-bin/restart.jim?now=yes');
|
|
});
|
|
</script>
|
|
|
|
Please wait while the Humax restarts...<br>
|
|
<div id=progressbar></div>
|
|
}
|
|
|
|
footer
|
|
|