#!/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 {
Please wait while the Humax restarts...