diff --git a/var/mongoose/include/modversion.jim b/var/mongoose/include/modversion.jim index 0584b1b2..78b1723b 100755 --- a/var/mongoose/include/modversion.jim +++ b/var/mongoose/include/modversion.jim @@ -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 " Web interface version: [system pkgver webif]
- Custom firmware version: [system modversion] + Custom firmware version: $modver " if {![catch {set fhtcpversion [system fhtcpversion]}]} { puts "
Humax Version: $fhtcpversion" diff --git a/var/mongoose/lib/system.class b/var/mongoose/lib/system.class index 32eaa25d..99d9aa08 100644 --- a/var/mongoose/lib/system.class +++ b/var/mongoose/lib/system.class @@ -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" }