From dbc3d2180785e16e92469c9955959637ed1a9669 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Thu, 14 Jul 2011 19:28:00 +0000 Subject: [PATCH] fix diskspace problem on HD git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@272 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- var/mongoose/include/diskspace.jim | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 369df3a8..3df1d5f7 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -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 diff --git a/var/mongoose/include/diskspace.jim b/var/mongoose/include/diskspace.jim index 982554c8..f89cc983 100755 --- a/var/mongoose/include/diskspace.jim +++ b/var/mongoose/include/diskspace.jim @@ -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 } } }