--- lib/PXElator/httpd.pm 2009/08/06 18:55:51 166 +++ lib/PXElator/httpd.pm 2009/08/06 22:29:58 173 @@ -52,6 +52,7 @@ use config; use client; use log; +use x11; sub static { my ($client,$path) = @_; @@ -106,7 +107,6 @@ use boolean; use kvm; -use qemu; $pids->{qemu} = 'stopped'; $SIG{CHLD} = 'IGNORE'; @@ -136,7 +136,7 @@ if ( $daemon =~ m{dhcpd|tftpd|dnsd} ) { my $exec = "perl -I$server::base_dir/lib -I$server::base_dir/lib/PXElator -M$daemon -e ${daemon}::${invoke}"; warn "exec $exec"; - exec "xterm -T $daemon -n $daemon -e $exec"; + x11::xterm( $daemon => $exec ); } else { my $eval = $daemon . '::' . $invoke . '(' . ( @_ ? dump(@_) : '' ) . ')'; warn "eval $eval"; @@ -174,11 +174,12 @@ foreach my $name ( sort keys %$pids ) { my $pid = $pids->{$name} || next; - my $html = qq|$pid|; + my $html; my $proc = "/proc/$pid/status"; if ( -e $proc ) { + $html .= qq|$pid|; if ( $debug ) { $html .= qq| ?|; @@ -196,6 +197,8 @@ if ( $name->can('actions') ) { $html .= qq| $_| foreach $name->actions; } + } else { + $html .= qq|restart $pid exited|; } push @rows, ( $name => $html ); @@ -248,16 +251,15 @@ } else { print $client $ok , qq|

Clients on $server::ip

| - , qq|| ; } } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) {