forked from hummypkg/webif
c095cc7913
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1632 2a923420-c742-0410-a762-8d5b09965624
36 lines
804 B
Plaintext
Executable File
36 lines
804 B
Plaintext
Executable File
#!/mod/bin/jimsh
|
|
|
|
source /mod/webif/lib/setup
|
|
require system.class
|
|
|
|
lassign [system diskspace] size used perc free fperc
|
|
set dsindex $($perc * 25 / 100 + 1)
|
|
if {$dsindex > 25} { set dsindex 25 }
|
|
set dsfile [format "%02d" $dsindex]
|
|
|
|
# The HD model only has the USB images which are blue. I prefer the green
|
|
# one so use those if available.
|
|
if {[file exists /opt/share/images/blue/345_2_14_ST_HDD_01.png]} {
|
|
set prefix 345_2_14_ST_HDD
|
|
} else {
|
|
set prefix 345_1_27_ST_USB
|
|
}
|
|
|
|
puts "
|
|
<span style=\"float: right;
|
|
background:url('/images/345_1_27_ST_USB_BG.png')
|
|
no-repeat\">
|
|
<a href=/diag/dspace/>
|
|
<img border=0 src=/images/${prefix}_$dsfile.png>
|
|
</a>
|
|
</span>
|
|
|
|
<span style=\"float: right\">
|
|
<br>
|
|
Total space: $size<br>
|
|
Used: $used ($perc%)<br>
|
|
Free: $free ($fperc%)
|
|
</span>
|
|
"
|
|
|