forked from hummypkg/webif
fix diskspace problem on HD
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@272 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
d1267cbd1e
commit
dbc3d21807
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.6.1
|
||||
Version: 0.6.1-1
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: mongoose(>=2.11-6),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.2),hmt(>=1.0.6),ssmtp
|
||||
|
@ -5,13 +5,18 @@ if {[os.gethostname] eq "hosting"} {
|
||||
set used "100GB"
|
||||
set perc "10"
|
||||
} else {
|
||||
set used 0
|
||||
set size 0
|
||||
set perc 0
|
||||
foreach df [split [exec df -h 2>>/dev/null] "\n\r"] {
|
||||
if [string match *sd?2* $df] {
|
||||
if {[string match *sd?2* $df] || \
|
||||
[string match *media/drive1* $df]} {
|
||||
regsub -all -- {[[:space:]]+} $df " " df
|
||||
set fields [split $df]
|
||||
set size [lindex $fields 1]
|
||||
set used [lindex $fields 2]
|
||||
set perc [string trimright [lindex $fields 4] "%"]
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user