Magellan Linux

Diff of /alx-src/branches/alx-web-070/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7109 by niro, Wed Sep 9 07:51:52 2015 UTC revision 7110 by niro, Wed Sep 9 11:20:52 2015 UTC
# Line 30  if(isset($_GET['s_krit'])) Line 30  if(isset($_GET['s_krit']))
30  function check_online($dat, $bla)  function check_online($dat, $bla)
31  {  {
32   global $comps;   global $comps;
33   global $pingcmd;   global $ssh_port;
34     global $mcore_port;
35     global $ping_timeout;
36   if(!isset($comps[$dat['serial']])) return false;   if(!isset($comps[$dat['serial']])) return false;
37    
38   //passthru("/bin/ping -I eth0 -c 1 -W 1 -q ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval);   // first try mcore, then get ssh
39   passthru($pingcmd." ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval);   $retval = ping_host($dat['ip'],$mcore_port,$ping_timeout);
40     if($retval==1) $retval = ping_host($dat['ip'],$ssh_port,$ping_timeout);
41   if($retval==0)   if($retval==0)
42   {   {
43   $comps[$dat['serial']]['online'] = true;   $comps[$dat['serial']]['online'] = true;

Legend:
Removed from v.7109  
changed lines
  Added in v.7110