--- lib/PXElator/httpd.pm 2009/08/15 22:38:02 224 +++ lib/PXElator/httpd.pm 2009/08/16 22:24:22 231 @@ -24,6 +24,7 @@
@@ -51,6 +52,8 @@ use browser; use network; use ip; +use wireshark; +use syslogd; use CouchDB; @@ -138,7 +141,7 @@ if ( -e $proc ) { $html .= qq|$pid|; if ( $debug ) { - $html .= qq| ?|; + $html .= qq| ?| if $name->can('start'); $debug_proc .= qq|$proc| @@ -147,15 +150,18 @@ ; } - if ( $name->can('start_fork') ) { - $html .= qq| $_| foreach $name->start_fork; + if ( $name->can('fork_if_active') ) { + $html .= qq| $_| foreach $name->fork_if_active; } if ( $name->can('actions') ) { - $html .= qq| $_| foreach $name->actions; + $html .= qq| $_| foreach $name->actions; } } else { - $html .= qq|restart $pid exited|; + $html .= qq|restart $pid exited| if $name->can('start'); + if ( $name->can('fork_actions') ) { + $html .= qq| $_| foreach $name->fork_actions; + } } push @rows, ( $name => $html ); @@ -268,6 +274,10 @@ ) ; } + } elsif ( $path =~ m{^/brctl} ) { + print $client ok + ,html::pre( `brctl show` ) + ; } elsif ( $path =~ m{^/ip/?(\w+)?} ) { print $client ok , join("\n", map { qq|$_| } ( qw/link addr route neigh ntable tunnel maddr mroute xfrm/ )) @@ -295,10 +305,10 @@ sub start { - warn 'tap ', network::tap(); + warn 'network ', network::setup(); daemons::start_stop 'browser', $url; - daemons::start_stop $_ foreach ( qw/dhcpd tftpd dnsd/ ); + daemons::start_stop $_ foreach ( qw/dhcpd tftpd dnsd syslogd/ ); daemons::start_stop 'kvm' unless $ENV{DEV}; # skip kvm statup when running on real device my $server = IO::Socket::INET->new(