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

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

revision 458 by dpavlin, Sat Jan 2 17:45:02 2010 UTC revision 527 by dpavlin, Fri Sep 17 17:18:30 2010 UTC
# Line 18  tie our $ip_to,   'ties', 'ip_to'     => Line 18  tie our $ip_to,   'ties', 'ip_to'     =>
18  tie our $domain,  'ties', 'domain'    => 'pxelator.lan';  tie our $domain,  'ties', 'domain'    => 'pxelator.lan';
19  tie our $new_clients, 'ties', 'new_clients' => $ip_to - $ip_from;  tie our $new_clients, 'ties', 'new_clients' => $ip_to - $ip_from;
20    
21    if ( my $dev = $ENV{DEV} ) {
22            my $ifconfig = `ifconfig $dev`;
23            die "can't ifconfig $dev" unless $ifconfig;
24            $ip      = $1 if $ifconfig =~ m/inet addr:(\S+)/s;
25            $netmask = $1 if $ifconfig =~ m/Mask:(\S+)/s;
26            $bcast   = $1 if $ifconfig =~ m/Bcast:(\S)/s;
27    }
28    
29  warn "DEV $ip $bcast $netmask";  warn "DEV $ip $bcast $netmask";
30    
31  our $conf = "$base_dir/conf";  our $conf = "$base_dir/conf";

Legend:
Removed from v.458  
changed lines
  Added in v.527

  ViewVC Help
Powered by ViewVC 1.1.26