forked from hummypkg/webif
add mod version to front page
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@397 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
f235b05026
commit
0b566bca72
@ -120,6 +120,7 @@ $(document).ready(function() {
|
|||||||
<a href=/jim/sqlite.html target=_blank>Sqlite</a>
|
<a href=/jim/sqlite.html target=_blank>Sqlite</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<!--#exec cmd="/mod/var/mongoose/include/modversion.jim" -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--#include virtual="/lib/footer.shtml" -->
|
<!--#include virtual="/lib/footer.shtml" -->
|
||||||
|
9
var/mongoose/include/modversion.jim
Executable file
9
var/mongoose/include/modversion.jim
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/mod/bin/jimsh
|
||||||
|
|
||||||
|
source /mod/var/mongoose/lib/setup
|
||||||
|
require system.class
|
||||||
|
|
||||||
|
puts "<font class=blood style=\"font-size: 0.9em; float: right; clear: right\">
|
||||||
|
Custom firmware version: [system modversion]
|
||||||
|
</font>"
|
||||||
|
|
@ -20,6 +20,17 @@ proc {system hostname} {} {
|
|||||||
return $hostname
|
return $hostname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc {system modversion} {} {
|
||||||
|
if {[catch {set fp [open /etc/modversion r]}]} {
|
||||||
|
set modver "1.02"
|
||||||
|
} else {
|
||||||
|
set modver [string trim [read $fp]]
|
||||||
|
close $fp
|
||||||
|
}
|
||||||
|
lassign [split $modver ""] a b c
|
||||||
|
return [format "%d.%d%d" $a $b $c]
|
||||||
|
}
|
||||||
|
|
||||||
proc {system diskspace} {} {
|
proc {system diskspace} {} {
|
||||||
switch [system model] {
|
switch [system model] {
|
||||||
HDR { set part /mnt/hd2 }
|
HDR { set part /mnt/hd2 }
|
||||||
|
Loading…
Reference in New Issue
Block a user