--- lib/PXElator/server.pm 2010/01/02 17:45:02 458 +++ lib/PXElator/server.pm 2010/09/17 17:18:30 527 @@ -18,6 +18,14 @@ tie our $domain, 'ties', 'domain' => 'pxelator.lan'; tie our $new_clients, 'ties', 'new_clients' => $ip_to - $ip_from; +if ( my $dev = $ENV{DEV} ) { + my $ifconfig = `ifconfig $dev`; + die "can't ifconfig $dev" unless $ifconfig; + $ip = $1 if $ifconfig =~ m/inet addr:(\S+)/s; + $netmask = $1 if $ifconfig =~ m/Mask:(\S+)/s; + $bcast = $1 if $ifconfig =~ m/Bcast:(\S)/s; +} + warn "DEV $ip $bcast $netmask"; our $conf = "$base_dir/conf";