change connectivity test

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@2047 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-10-08 00:25:31 +00:00
parent c886f6afd2
commit 987425b22a
2 changed files with 13 additions and 6 deletions

View File

@ -1,10 +1,10 @@
Package: webif Package: webif
Priority: optional Priority: optional
Section: web Section: web
Version: 1.0.17 Version: 1.0.17-1
Architecture: mipsel Architecture: mipsel
Maintainer: af123@hummypkg.org.uk 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),mongoose 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
Suggests: Suggests:
Description: An evolving web interface for the Humax. Description: An evolving web interface for the Humax.
Tags: http://hummy.tv/forum/threads/5031/ Tags: http://hummy.tv/forum/threads/5031/

View File

@ -375,11 +375,18 @@ proc {system filename} {str {extra ""}} {
return [regsub -all "\[$chars]" $str "_"] return [regsub -all "\[$chars]" $str "_"]
} }
proc {system connectivity} {{site "hpkg.tv"}} { proc {system connectivity} {{site "hpkg.tv"} {port 80} {ret "0"}} {
if {[catch {exec /bin/ping -4 -c 2 -W 3 -w 3 -q $site >/dev/null}]} { set extra [lassign [exec /mod/bin/tcpping $site $port] result]
return 0 if {$ret ne "0"} { upvar $ret err }
switch $result {
OK { return 1 }
default {
set err [list $result $extra]
return 0
}
} }
return 1 set err UNKNOWN
return 0
} }
proc {system strip} {str} { proc {system strip} {str} {