diff --git a/CONTROL/control b/CONTROL/control index 12b81355..b4d08b6d 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.0.17-6 +Version: 1.0.17-8 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.13),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),mongoose diff --git a/webif/cgi-bin/opkg.jim b/webif/cgi-bin/opkg.jim index 333c608f..6bc03cfb 100755 --- a/webif/cgi-bin/opkg.jim +++ b/webif/cgi-bin/opkg.jim @@ -22,7 +22,11 @@ proc opkg {cmd} { httpheader "text/plain" -if {![system connectivity]} { +set cmdargs [lassign $cmd cmd] + +set netcmds {install update upgrade} + +if {$cmd in $netcmds && ![system connectivity]} { puts "" puts "!! ERROR - No network connectivity to package repository !!" puts "" @@ -31,7 +35,7 @@ if {![system connectivity]} { } if {$cmd eq "upgrade"} { opkg update } -opkg $cmd +opkg "$cmd $cmdargs" if {$cmd eq "update" || $cmd eq "upgrade"} { puts "Updating package meta information" diff --git a/webif/html/diskspace/diskspace.jim b/webif/html/diskspace/diskspace.jim index fade8e6b..d21b767c 100755 --- a/webif/html/diskspace/diskspace.jim +++ b/webif/html/diskspace/diskspace.jim @@ -30,7 +30,7 @@ puts " diskspace_data = \[ { name: 'Used', - y: $($used - $dbs), + y: $used, sliced: false, pretty: '$usedstr' }, diff --git a/webif/lib/plugin b/webif/lib/plugin index 0d3bf014..c44c52c0 100644 --- a/webif/lib/plugin +++ b/webif/lib/plugin @@ -1,6 +1,6 @@ proc eval_plugins {hook} { - foreach plugin [glob -nocomplain /mod/webif/plugin/*] { + foreach plugin [lsort [glob -nocomplain /mod/webif/plugin/*]] { if {[file isfile "$plugin/$hook.hook"]} { catch {uplevel source "$plugin/$hook.hook"} } diff --git a/webif/lib/pretty_size b/webif/lib/pretty_size index 1a4b4724..ec353de8 100644 --- a/webif/lib/pretty_size +++ b/webif/lib/pretty_size @@ -3,7 +3,8 @@ if {![exists -proc pretty_size]} { proc pretty_size {size} { set units {bytes KiB MiB GiB TiB} - for {set i 0} {$size > 1023} {incr i} { + for {set i 0; set l [llength $units]; incr l -1} { + $size > 1023 && $i < $l} {incr i} { set size $($size / 1024.0) }