63 |
# parent |
# parent |
64 |
close($client); |
close($client); |
65 |
$static_pids->{$pid} = $path; |
$static_pids->{$pid} = $path; |
|
CouchDB::audit('static', 'parent', { pid => $pid, path => $path }); |
|
66 |
return 1; |
return 1; |
67 |
} |
} |
68 |
|
|
81 |
my $buff; |
my $buff; |
82 |
my $pos = 0; |
my $pos = 0; |
83 |
|
|
84 |
CouchDB::audit( 'static', 'child', { pid => $$, path => $path, type => $type, size => $size, block => $block }); |
CouchDB::audit( 'static', { pid => $$, path => $path, type => $type, size => $size, block => $block, peerhost => $client->peerhost }); |
85 |
|
|
86 |
progress_bar::start; |
progress_bar::start; |
87 |
|
|
96 |
|
|
97 |
print STDERR "\n"; |
print STDERR "\n"; |
98 |
|
|
|
CouchDB::audit( 'static', 'child', 'exit', { pid => $$ } ); |
|
|
|
|
99 |
exit(0); |
exit(0); |
100 |
} |
} |
101 |
|
|
114 |
|
|
115 |
server->refresh; |
server->refresh; |
116 |
|
|
117 |
CouchDB::audit( 'request', { path => $path, param => $param } ); |
CouchDB::audit( 'request', { path => $path, param => $param, peerhost => $client->peerhost } ); |
118 |
|
|
119 |
if ( my $found = static( $client,$path ) ) { |
if ( my $found = static( $client,$path ) ) { |
120 |
warn "static $found" if $debug; |
warn "static $found" if $debug; |
203 |
|
|
204 |
my $deploy; |
my $deploy; |
205 |
|
|
206 |
if ( my $mac = client::mac( $ip ) ) { |
if ( my $mac = client::mac_from_ip( $ip ) ) { |
207 |
$deploy = client::conf( $ip, 'deploy' => $param->{deploy} ); |
$deploy = client::conf( $ip, 'deploy' => $param->{deploy} ); |
208 |
push @table, ( |
push @table, ( |
209 |
'mac' => $mac, |
'mac' => format::mac( $mac => 'html' ), |
210 |
'deploy' => html::select( 'deploy', $deploy, config::available ) |
'deploy' => html::select( 'deploy', $deploy, config::available ) |
211 |
); |
); |
212 |
$deploy = qq|<h2>PXElinux</h2>| . html::pre( config::for_ip( $ip ) ); |
$deploy = qq|<h2>PXElinux</h2>| . html::pre( config::for_ip( $ip ) ); |
243 |
map { |
map { |
244 |
my $ip = $_; |
my $ip = $_; |
245 |
$ip =~ s{^.+/ip/}{}; |
$ip =~ s{^.+/ip/}{}; |
246 |
my $arp = $arp->{ client::mac $ip, 'clean' }; |
my $mac = client::mac_from_ip $ip; |
247 |
|
my $arp = $arp->{ $mac }; |
248 |
$arp = $arp ? $arp->[1] : ''; |
$arp = $arp ? $arp->[1] : ''; |
249 |
$arp =~ s{$ip}{}; |
$arp =~ s{$ip}{}; |
250 |
( |
( |
251 |
qq|<a href=/client/$ip>$ip</a>| |
qq|<a href=/client/$ip>$ip</a>| |
252 |
, client::conf( $ip, 'hostname' ) |
, client::conf( $ip, 'hostname' ) |
253 |
, client::mac( $ip ) |
, format::mac( $mac => 'html' ) |
254 |
, html::tt( client::conf( $ip, 'deploy' ) ) |
, html::tt( client::conf( $ip, 'deploy' ) ) |
255 |
, $arp |
, $arp |
256 |
); |
); |
261 |
, html::table( -3, 'mac', 'dev', 'ip', |
, html::table( -3, 'mac', 'dev', 'ip', |
262 |
map { |
map { |
263 |
my $c = $arp->{$_}; |
my $c = $arp->{$_}; |
264 |
( html::tt( $_ ), $c->[1], $c->[0] ) |
( format::mac( $_ => 'html' ), $c->[1], $c->[0] ) |
265 |
} sort keys %$arp |
} sort keys %$arp |
266 |
) |
) |
267 |
; |
; |