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

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

revision 229 by dpavlin, Sun Aug 16 21:35:23 2009 UTC revision 243 by dpavlin, Mon Aug 17 13:25:48 2009 UTC
# Line 53  use browser; Line 53  use browser;
53  use network;  use network;
54  use ip;  use ip;
55  use wireshark;  use wireshark;
56    use syslogd;
57    
58  use CouchDB;  use CouchDB;
59    
# Line 130  sub get_request { Line 131  sub get_request {
131    
132                  my $debug_proc = '';                  my $debug_proc = '';
133    
134    warn "XXX pids = ", dump( $daemons::pids );
135    
136                  foreach my $name ( sort keys %$daemons::pids ) {                  foreach my $name ( sort keys %$daemons::pids ) {
137                          my $pid = $daemons::pids->{$name} || next;                          my $pid = $daemons::pids->{$name}; # || next;
138    
139                          my $html;                          my $html;
140    
# Line 157  sub get_request { Line 160  sub get_request {
160                                          $html .= qq| <a href=/action/$name/$_>$_</a>| foreach $name->actions;                                          $html .= qq| <a href=/action/$name/$_>$_</a>| foreach $name->actions;
161                                  }                                  }
162                          } else {                          } else {
163                                  $html .= qq|<a href=/start_stop/$name>restart</a> $pid exited| if $name->can('start');                                  if ( $pid =~ m{^\d+$} ) {
164                                            $html .= qq|$pid exited |
165                                    } else {
166                                            $html .= qq|$pid |;
167                                    }
168                                    $html .= qq|<a href=/start_stop/$name>restart</a>| if $pid || $name->can('start');
169                                  if ( $name->can('fork_actions') ) {                                  if ( $name->can('fork_actions') ) {
170                                          $html .= qq| <a href=/start_stop/$name/$_>$_</a>| foreach $name->fork_actions;                                          $html .= qq| <a href=/start_stop/$name/$_>$_</a>| foreach $name->fork_actions;
171                                  }                                  }
172                          }                          }
173    
174                            die "no html generated" unless $html;
175    
176                          push @rows, ( $name => $html );                          push @rows, ( $name => $html );
177                  }                  }
178    
# Line 307  sub start { Line 317  sub start {
317          warn 'network ', network::setup();          warn 'network ', network::setup();
318    
319          daemons::start_stop 'browser', $url;          daemons::start_stop 'browser', $url;
320          daemons::start_stop $_ foreach ( qw/dhcpd tftpd dnsd/ );          daemons::start_stop $_ foreach ( qw/dhcpd tftpd dnsd syslogd/ );
321          daemons::start_stop 'kvm' unless $ENV{DEV}; # skip kvm statup when running on real device          daemons::start_stop 'kvm' unless $ENV{DEV}; # skip kvm statup when running on real device
322    
323          my $server = IO::Socket::INET->new(          my $server = IO::Socket::INET->new(

Legend:
Removed from v.229  
changed lines
  Added in v.243

  ViewVC Help
Powered by ViewVC 1.1.26