--- lib/PXElator/httpd.pm 2009/08/09 21:13:36 185 +++ lib/PXElator/httpd.pm 2009/08/09 23:18:59 189 @@ -184,23 +184,32 @@ my $ip = $1 || $client->peerhost; if ( $ip ne $server::ip ) { my $hostname = client::conf( $ip, 'hostname' => $param->{hostname} ); - my $deploy = client::conf( $ip, 'deploy' => $param->{deploy} ); + + my @table = ( + 'ip' => $ip, + 'hostname' => qq||, + ); + + my $deploy; + + if ( my $mac = client::mac( $ip ) ) { + $deploy = client::conf( $ip, 'deploy' => $param->{deploy} ); + push @table, ( + 'mac' => $mac, + 'deploy' => html::select( 'deploy', $deploy, config::available ) + ); + $deploy = qq|

PXElinux

| . html::pre( config::for_ip( $ip ) ); + } + print $client $ok , qq|
| - , html::table( 2, - 'ip' => $ip, - 'mac' => client::mac( $ip ), - 'hostname' => qq||, - 'deploy' => html::select( 'deploy', $deploy, config::available ), - ) + , html::table( 2, @table ), , qq|
| - , qq|

PXElinux $deploy

|
-				, config::for_ip( $ip )
-				, qq|
| + , $deploy ; if ( my $amt = client::conf( $ip, 'amt' ) ) { - print $client amt::info( $amt ); + print $client qq|

AMT

|, amt::info( $amt ); } } else { print $client $ok @@ -240,6 +249,10 @@ warn 'tap ', network::tap(); + daemons::start_stop 'browser', $url; + daemons::start_stop $_ foreach ( qw/dhcpd tftpd dnsd/ ); + daemons::start_stop 'kvm' unless $ENV{DEV}; # skip kvm statup when running on real device + my $server = IO::Socket::INET->new( Proto => 'tcp', LocalAddr => $server::ip, @@ -250,10 +263,6 @@ print "url $url\n"; - daemons::start_stop 'browser', $url; - daemons::start_stop $_ foreach ( qw/dhcpd tftpd dnsd/ ); - daemons::start_stop 'kvm' unless $ENV{DEV}; # skip kvm statup when running on real device - while (1) { my $client = $server->accept() || next; # ALARM trickle us my $request = <$client>;