/[pxelator]/lib/PXElator/client.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/client.pm

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

revision 328 by dpavlin, Fri Aug 28 19:36:36 2009 UTC revision 329 by dpavlin, Fri Aug 28 21:55:41 2009 UTC
# Line 6  use autodie; Line 6  use autodie;
6    
7  use File::Slurp;  use File::Slurp;
8  use Net::Ping;  use Net::Ping;
9    use Data::Dump qw/dump/;
10    
11  use server;  use server;
12  use format;  use format;
# Line 171  sub remove { Line 172  sub remove {
172          rmdir "$server::conf/ip/$ip";          rmdir "$server::conf/ip/$ip";
173  }  }
174    
175    sub arp_mac_dev {
176            my $arp = {
177                    map {
178                            my @c = split(/\s+/,$_);
179                            if ( $#c == 5 ) {
180                                    client::save_ip_mac( $c[0], $c[3] );
181                                    ( uc $c[3] => $c[5] )
182                            } else {
183                            }
184                    } read_file('/proc/net/arp')
185            };
186    
187            warn "# arp ",dump( $arp );
188            return $arp;
189    }
190    
191  1;  1;

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

  ViewVC Help
Powered by ViewVC 1.1.26