/[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 189 by dpavlin, Sun Aug 9 23:18:59 2009 UTC revision 190 by dpavlin, Mon Aug 10 00:07:38 2009 UTC
# Line 212  sub get_request { Line 212  sub get_request {
212                                  print $client qq|<h2>AMT</h2>|, amt::info( $amt );                                  print $client qq|<h2>AMT</h2>|, amt::info( $amt );
213                          }                          }
214                  } else {                  } else {
215    
216                            my $arp = {
217                                    map {
218                                            my @c = split(/\s+/,$_);
219                                            if ( $#c == 5 ) {
220                                                    ( uc $c[3] => [ $c[0] , $c[5] ] )
221                                            } else {
222                                            }
223                                    } read_file('/proc/net/arp')
224                            };
225    
226                            warn "# arp ",dump( $arp );
227    
228                          print $client $ok                          print $client $ok
229                                  , qq|<h2>Clients on $server::ip</h2>|                                  , qq|<h2>Clients on $server::ip</h2>|
230                                  , html::table( -4,                                  , html::table( -5,
231                                          'ip', 'mac', 'hostname', 'deploy',                                          'ip', 'hostname', 'mac', 'deploy', 'arp',
232                                          map {                                          map {
233                                                  my $ip = $_;                                                  my $ip = $_;
234                                                  $ip =~ s{^.+/ip/}{};                                                  $ip =~ s{^.+/ip/}{};
235                                                  ( qq|<a href=/client/$ip>$ip</a>|, client::mac($ip), client::conf( $ip, 'hostname' ), html::tt client::conf( $ip, 'deploy' ) );                                                  my $arp = $arp->{ client::mac $ip, 'clean' };
236                                                    $arp = $arp ? $arp->[1] : '';
237                                                    $arp =~ s{$ip}{};
238                                                    (
239                                                            qq|<a href=/client/$ip>$ip</a>|
240                                                            , client::conf( $ip, 'hostname' )
241                                                            , client::mac( $ip )
242                                                            , html::tt( client::conf( $ip, 'deploy' ) )
243                                                            , $arp
244                                                    );
245                                          }                                          }
246                                          glob("$server::conf/ip/*")                                          glob("$server::conf/ip/*")
247                                  )                                  )
248                                    , qq|<h2>ARP</h2>|
249                                    , html::pre_dump( $arp )
250                                  ;                                  ;
251                  }                  }
252          } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) {          } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) {

Legend:
Removed from v.189  
changed lines
  Added in v.190

  ViewVC Help
Powered by ViewVC 1.1.26