Changeset 137

Show
Ignore:
Timestamp:
03/23/06 17:33:12 (3 years ago)
Author:
ludo
Message:

display tried ip addresses on error (from r3134)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/webmin/lbs-vnc/index.cgi

    r106 r137  
    103103 
    104104  # Try 1st the IP 
     105  $ips = ""; 
    105106  $ip = $ether["$mac"]["ip"]; 
    106107  if (!stristr($ip, "dynami")) { 
    107108    scanRunVNC($ip, $type, $ssh); 
     109    $ips .= $ip; 
    108110  } 
    109111  # Then DNS 
     
    114116  if ($ip != $name) { 
    115117    scanRunVNC($ip, $type, $ssh); 
     118    $ips .= " ".$ip; 
    116119  } 
    117   # and nmblookupheader("Location: ".$_SERVER['HTTP_REFERER']);  
     120 
     121  # and nmblookup  
    118122  $ret = exec("/usr/bin/nmblookup $name 2>&1"); 
    119123  preg_match("/(\d+\.\d+\.\d+\.\d+) /", $ret, $match); 
     
    121125  if ($ip != "") { 
    122126      scanRunVNC($ip, $type, $ssh);      
     127      $ips .= " ".$ip; 
     128  } 
     129 
     130  # and net lookup  
     131  $ret = exec("/usr/bin/net lookup host $name 2>&1"); 
     132  preg_match("/^(\d+\.\d+\.\d+\.\d+)/", $ret, $match); 
     133  $ip = $match[1];  
     134  if ($ip != "") { 
     135      scanRunVNC($ip, $type, $ssh);      
     136      $ips .= " ".$ip; 
    123137  } 
    124138   
     
    130144        if (strcasecmp($cols[5], $mac) == 0) { 
    131145            scanRunVNC($cols[7], $type, $ssh); 
     146            $ips .= " ".$ip; 
    132147        } 
    133148    } 
     
    137152  echo perl_exec("lbs_header.cgi", array("remote_control", $text{'index_title'}, "index")); 
    138153  $t = tmplInit(array("main" => "main.tpl", "erreur" => "erreur.tpl")); 
     154  $t->set_var("IPS", $ips); 
    139155  $t->pparse("out", "erreur"); 
    140156  echo perl_exec("lbs_footer.cgi", array("2")); 
  • trunk/webmin/lbs-vnc/tmpl/en/erreur.tpl

    r106 r137  
    1010</ul></td></tr> 
    1111</table><br/><br/> 
     12<p>IP addresses tried: {IPS} 
  • trunk/webmin/lbs-vnc/tmpl/fr/erreur.tpl

    r106 r137  
    1010</ul></td></tr> 
    1111</table><br/><br/> 
     12<p>Adresses IP essayées: {IPS}