/[pxelator]/lib/PXElator/httpd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/httpd.pm

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

revision 326 by dpavlin, Fri Aug 28 19:39:54 2009 UTC revision 329 by dpavlin, Fri Aug 28 21:55:41 2009 UTC
# Line 269  warn "XXX pids = ", dump( $daemons::pids Line 269  warn "XXX pids = ", dump( $daemons::pids
269                          if ( my $amt = client::conf( $ip, 'amt' ) ) {                          if ( my $amt = client::conf( $ip, 'amt' ) ) {
270                                  print $client qq|<h2>AMT</h2>|, amt::info( $amt, $ip );                                  print $client qq|<h2>AMT</h2>|, amt::info( $amt, $ip );
271                          }                          }
                 } else {  
272    
273                          my $arp = {                  } else {
                                 map {  
                                         my @c = split(/\s+/,$_);  
                                         if ( $#c == 5 ) {  
                                                 client::save_ip_mac( $c[0], $c[3] );  
                                                 ( uc $c[3] => [ $c[0] , $c[5] ] )  
                                         } else {  
                                         }  
                                 } read_file('/proc/net/arp')  
                         };  
274    
275                          warn "# arp ",dump( $arp );                          my $arp = clinet::arp_mac_dev;
276    
277                          print $client ok                          print $client ok
278                                  , qq|<h2>Clients on $server::ip</h2>|                                  , qq|<h2>Clients on $server::ip</h2>|
279                                  , html::table( -6,                                  , html::table( -6,
280                                          'ip', 'mac', 'arp', 'hostname', 'deploy', 'conf',                                          'ip', 'mac', 'dev', 'hostname', 'deploy', 'conf',
281                                          map {                                          map {
282                                                  my $ip = $_;                                                  my $ip = $_;
283                                                  my $conf = client::all_conf( $ip );                                                  my $conf = client::all_conf( $ip );
# Line 295  warn "XXX pids = ", dump( $daemons::pids Line 285  warn "XXX pids = ", dump( $daemons::pids
285                                                  (                                                  (
286                                                          qq|<a name=$ip href=/client/$ip>$ip</a>|                                                          qq|<a name=$ip href=/client/$ip>$ip</a>|
287                                                          , format::mac( $mac => 'html' )                                                          , format::mac( $mac => 'html' )
288                                                          , ( $arp->{$mac} ? $arp->{$mac}->[1] : '' )                                                          , $arp->{$mac}
289                                                          , delete $conf->{hostname}                                                          , delete $conf->{hostname}
290                                                          , delete $conf->{deploy}                                                          , delete $conf->{deploy}
291                                                          , ( %$conf ? html::pre_dump( $conf ) : qq|<a href=/nmap?scan=$ip>nmap</a>| )                                                          , ( %$conf ? html::pre_dump( $conf ) : qq|<a href=/nmap?scan=$ip>nmap</a>| )
# Line 371  sub start { Line 361  sub start {
361    
362                  if ($request =~ m{^GET (/.*) HTTP/1.[01]}) {                  if ($request =~ m{^GET (/.*) HTTP/1.[01]}) {
363                          my $path = $1;                          my $path = $1;
364                            $path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge;
365                          my $param;                          my $param;
366                          if ( $path =~ s{\?(.+)}{} ) {                          if ( $path =~ s{\?(.+)}{} ) {
367                                  foreach my $p ( split(/[&;]/, $1) ) {                                  foreach my $p ( split(/[&;]/, $1) ) {

Legend:
Removed from v.326  
changed lines
  Added in v.329

  ViewVC Help
Powered by ViewVC 1.1.26