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

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

revision 481 by dpavlin, Tue Jan 5 17:26:34 2010 UTC revision 482 by dpavlin, Sat Jan 23 18:31:14 2010 UTC
# Line 12  use Regexp::Common qw/net/; Line 12  use Regexp::Common qw/net/;
12    
13  use html;  use html;
14  use ping;  use ping;
15  use CouchDB;  use store;
16  use Carp qw/confess/;  use Carp qw/confess/;
17    
18  sub ip {  sub ip {
# Line 36  sub ip { Line 36  sub ip {
36    
37  sub power_state {  sub power_state {
38          my $state = eval { Intel::AMT::RemoteControl::SystemPowerState };          my $state = eval { Intel::AMT::RemoteControl::SystemPowerState };
39          CouchDB::audit('SystemPowerState', { ip => $ENV{AMT_HOST}, SystemPowerState => $state });          store::audit('SystemPowerState', { ip => $ENV{AMT_HOST}, SystemPowerState => $state });
40          return $state;          return $state;
41  }  }
42    
# Line 54  sub network { Line 54  sub network {
54                  warn "ERROR $@";                  warn "ERROR $@";
55          } else {          } else {
56                  $amt->{ip} = $ENV{AMT_HOST};                  $amt->{ip} = $ENV{AMT_HOST};
57                  CouchDB::audit('log', $amt );                  store::audit('log', $amt );
58          }          }
59          $amt;          $amt;
60  }  }
# Line 67  sub log { Line 67  sub log {
67                  warn "ERROR $@";                  warn "ERROR $@";
68          } else {          } else {
69                  $amt->{ip} = $ENV{AMT_HOST};                  $amt->{ip} = $ENV{AMT_HOST};
70                  CouchDB::audit('log', $amt );                  store::audit('log', $amt );
71          }          }
72          $amt;          $amt;
73  }  }
# Line 76  sub RemoteControl { Line 76  sub RemoteControl {
76          ip shift;          ip shift;
77          my $command = shift;          my $command = shift;
78          eval { Intel::AMT::RemoteControl::run( $command ) };          eval { Intel::AMT::RemoteControl::run( $command ) };
79          CouchDB::audit( $command, { ip => $ENV{AMT_HOST}, error => $@ } );          store::audit( $command, { ip => $ENV{AMT_HOST}, error => $@ } );
80          warn "ERROR $@" if $@;          warn "ERROR $@" if $@;
81  }  }
82    

Legend:
Removed from v.481  
changed lines
  Added in v.482

  ViewVC Help
Powered by ViewVC 1.1.26