webif/var/mongoose/html/diag/rundiag.jim
hummypkg 17ba0bb00e remove SSI
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1837 2a923420-c742-0410-a762-8d5b09965624
2014-04-14 22:54:01 +00:00

30 lines
492 B
Plaintext
Executable File

#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require system.class
cgi_input
#cgi_dump
set diag [cgi_get diag general]
httpheader "text/plain"
if {[system modversion 1] < 113} {
puts ">>> Diagnostics only available with customised firmware 1.13 or above."
exit
}
puts ">>> Beginning diagnostic $diag\r\n"
set bcmd "|/bin/diag $diag"
set fd [open $bcmd r]
while {[gets $fd line] >= 0} {
puts "$line"
}
close $fd
puts "\r\n"
puts ">>> Ending diagnostic $diag\r\n"