From c76e6638a4d9022db0d3deb18d6dda77c2496321 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sun, 27 Apr 2014 14:49:46 +0000 Subject: [PATCH] fix modversion.jim git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1856 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- var/mongoose/cgi-bin/env.jim | 8 ++++---- var/mongoose/include/modversion.jim | 21 ++++++++++++--------- var/mongoose/lib/system.class | 4 ++-- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 5cf2d3b..c0a20fe 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.0.11-3 +Version: 1.0.11-4 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.10),mongoose(>=3.0.11),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6) diff --git a/var/mongoose/cgi-bin/env.jim b/var/mongoose/cgi-bin/env.jim index c033bb5..fa9d74a 100755 --- a/var/mongoose/cgi-bin/env.jim +++ b/var/mongoose/cgi-bin/env.jim @@ -1,9 +1,9 @@ #!/mod/bin/jimsh source /mod/webif/lib/setup -httpheader "text/plain" +httpheader -foreach f [dict keys $env] { - puts "$f = $env($f)" -} +puts "
"
+parray env
+puts "
" diff --git a/var/mongoose/include/modversion.jim b/var/mongoose/include/modversion.jim index e9b3812..09ed522 100755 --- a/var/mongoose/include/modversion.jim +++ b/var/mongoose/include/modversion.jim @@ -9,15 +9,18 @@ if {$modbuild > 0} { append modver " (build $modbuild)" } -puts " - Web interface version: [system pkgver webif]
+if {[dict exists $env SERVER_SOFTWARE]} { + set wstype "Lighttpd" +} else { + set wstype "Mongoose" +} + +puts " + Web interface version: [system pkgver webif] ($wstype)
Custom firmware version: $modver " -if {![catch {set fhtcpversion [system fhtcpversion]}]} { - puts "
Humax Version: $fhtcpversion" -} -if {![catch {set kernelver [system kernelver]}]} { - puts "
Kernel Version: $kernelver" -} -puts "
" +catch {set fhtcpversion [system fhtcpversion]} +catch {set kernelver [system kernelver]} +puts "
Humax Version: $fhtcpversion (kernel $kernelver)" +puts "" diff --git a/var/mongoose/lib/system.class b/var/mongoose/lib/system.class index 2035026..9323e86 100644 --- a/var/mongoose/lib/system.class +++ b/var/mongoose/lib/system.class @@ -82,7 +82,7 @@ proc {system kernelver} {} { "Mar 6 07:27:02 KST 2013" { format "HDR_1.03.06(a)" } "May 8 14:32:30 KST 2013" { format "HDR_1.03.06(b)" } "Dec 10 14:36:54 KST 2013" { format "HDR_1.03.11" } - "Fri Feb 7 14:15:02 KST 2014 " { format "HDR_1.03.12" } + "Feb 7 14:15:02 KST 2014 " { format "HDR_1.03.12" } # HD "Oct 11 21:14:31 KST 2010" { format "HD_1.01.12" } @@ -93,7 +93,7 @@ proc {system kernelver} {} { "Jul 5 19:41:17 KST 2012 " { format "HD_1.02.29" } "Oct 13 12:48:09 KST 2012" { format "HD_1.02.31" } - - { format "Unknown - $ver" } + default { format "Unknown - $ver" } }] }