From c2ec779465ff7cc3531f9e7731efc8c15a4f5186 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Thu, 5 Jan 2012 22:42:45 +0000 Subject: [PATCH] allow restart cancel, improve logfile list git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@629 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/cgi-bin/restart.jim | 6 ++++++ var/mongoose/include/logfiles.jim | 2 +- var/mongoose/include/restart.jim | 10 ++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/var/mongoose/cgi-bin/restart.jim b/var/mongoose/cgi-bin/restart.jim index 67d456f..eabda67 100755 --- a/var/mongoose/cgi-bin/restart.jim +++ b/var/mongoose/cgi-bin/restart.jim @@ -8,6 +8,12 @@ puts "Content-Type: text/html" puts "" cgi_input + +if {[cgi_get act] eq "cancel"} { + file delete /tmp/.restartpending + exit +} + if {[cgi_get now] eq "yes"} { # - Busybox reboot does sync the disk but may still not be clean enough. puts "Restarting." diff --git a/var/mongoose/include/logfiles.jim b/var/mongoose/include/logfiles.jim index 720cba2..d87ff87 100755 --- a/var/mongoose/include/logfiles.jim +++ b/var/mongoose/include/logfiles.jim @@ -4,7 +4,7 @@ source /mod/var/mongoose/lib/setup require pretty_size foreach file [concat \ - [glob -nocomplain /tmp/*.log] \ + [glob -nocomplain /var/log/*.log] \ [glob -nocomplain /mod/tmp/*.log] \ ] { puts " diff --git a/var/mongoose/include/restart.jim b/var/mongoose/include/restart.jim index 9b9c47f..b7d47f7 100755 --- a/var/mongoose/include/restart.jim +++ b/var/mongoose/include/restart.jim @@ -25,17 +25,23 @@ if {[system busy]} { } puts { +
}