forked from hummypkg/webif
add build number to main screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1299 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
79bff00465
commit
d6df19dd32
@ -3,10 +3,15 @@
|
||||
source /mod/webif/lib/setup
|
||||
require system.class
|
||||
|
||||
set modver [system modversion]
|
||||
set modbuild [system modbuild]
|
||||
if {$modbuild > 0} {
|
||||
append modver " (build $modbuild)"
|
||||
}
|
||||
|
||||
puts "<font class=blood style=\"font-size: 0.9em; float: right; clear: right\">
|
||||
Web interface version: [system pkgver webif]<br>
|
||||
Custom firmware version: [system modversion]
|
||||
Custom firmware version: $modver
|
||||
"
|
||||
if {![catch {set fhtcpversion [system fhtcpversion]}]} {
|
||||
puts "<br>Humax Version: $fhtcpversion"
|
||||
|
@ -43,6 +43,16 @@ proc {system modversion} {{short 0}} {
|
||||
return [format "%d.%d%d" $a $b $c]
|
||||
}
|
||||
|
||||
proc {system modbuild} {} {
|
||||
if {[catch {set fp [open /etc/modbuild r]}]} {
|
||||
return 0
|
||||
} else {
|
||||
set modbuild [string trim [read $fp]]
|
||||
close $fp
|
||||
}
|
||||
return $modbuild
|
||||
}
|
||||
|
||||
proc {system fhtcpversion} {} {
|
||||
set file "/etc/fhtcpversion"
|
||||
if {![file exists $file]} { set file "/root/fhtcpversion" }
|
||||
|
Loading…
Reference in New Issue
Block a user