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

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

revision 398 by dpavlin, Tue Sep 8 17:30:47 2009 UTC revision 547 by dpavlin, Sat Oct 9 18:23:29 2010 UTC
# Line 7  use File::Slurp; Line 7  use File::Slurp;
7  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
8    
9  use x11;  use x11;
10  use CouchDB;  use store;
11    
12  our $pids;  our $pids;
13  $pids = {  $pids = {
# Line 29  $SIG{CHLD} = 'IGNORE'; Line 29  $SIG{CHLD} = 'IGNORE';
29  sub audit {  sub audit {
30          my $msg = shift;          my $msg = shift;
31          my $daemon = shift;          my $daemon = shift;
32          CouchDB::audit( $msg, $daemon, { daemon => $daemon, message => $msg, @_ } );          store::audit( $msg, $daemon, { daemon => $daemon, message => $msg, @_ } );
33  }  }
34    
35  mkdir "$server::conf/pid" unless -d "$server::conf/pid";  mkdir "$server::conf/pid" unless -d "$server::conf/pid";
# Line 37  mkdir "$server::conf/pid" unless -d "$se Line 37  mkdir "$server::conf/pid" unless -d "$se
37  sub start_stop {  sub start_stop {
38          my ($daemon,$param) = @_;          my ($daemon,$param) = @_;
39    
40          $daemon .= '.' . $param->{nr} if defined $param->{nr}; # XXX nr for kvm          if ( defined $param->{nr} ) { # XXX nr for kvm
41                    $daemon .= '.' . $param->{nr};
42            } else {
43                    $param->{nr} = $1 if $daemon =~ /\.(\d+)/;
44            }
45    
46          my $pid = $pids->{$daemon};          my $pid = $pids->{$daemon};
47          my $pid_path = $daemon;          my $pid_path = $daemon;

Legend:
Removed from v.398  
changed lines
  Added in v.547

  ViewVC Help
Powered by ViewVC 1.1.26