/[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 263 by dpavlin, Wed Aug 19 11:51:51 2009 UTC revision 336 by dpavlin, Sat Aug 29 00:07:00 2009 UTC
# Line 8  use Intel::AMT::RemoteControl; Line 8  use Intel::AMT::RemoteControl;
8  use Intel::AMT::NetworkAdministration;  use Intel::AMT::NetworkAdministration;
9  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
10  use Regexp::Common qw/net/;  use Regexp::Common qw/net/;
 use Net::Ping;  
11    
12  use html;  use html;
13    use ping;
14  use CouchDB;  use CouchDB;
15    
16  sub info {  sub info {
# Line 20  sub info { Line 20  sub info {
20    
21          $ip ||= $client_ip;          $ip ||= $client_ip;
22    
23          my $p = Net::Ping->new;          if ( ! ping::host( $ip ) ) {
24                    warn "$ip unreachable";
         if ( ! $p->ping( $ip, 0.7 ) ) {  
                 return "$ip unreachable";  
25          }          }
26    
27          warn "amt $ip ", '*' x length($passwd), "\n";          warn "amt $ip ", '*' x length($passwd), "\n";
# Line 31  sub info { Line 29  sub info {
29          $ENV{AMT_HOST} = $ip;          $ENV{AMT_HOST} = $ip;
30          $ENV{AMT_PASSWORD} = $passwd;          $ENV{AMT_PASSWORD} = $passwd;
31    
32          my $amt = Intel::AMT::NetworkAdministration::network_settings;          my $amt;
33          $amt->{power_state} = Intel::AMT::RemoteControl::SystemPowerState;          eval {
34                    $amt = Intel::AMT::NetworkAdministration::network_settings;
35          CouchDB::audit('network', $amt );                  $amt->{power_state} = Intel::AMT::RemoteControl::SystemPowerState;
36                    CouchDB::audit('network', $amt );
37            };
38            warn "ERROR amt $@" if $@;
39    
40          my $out;          my $out;
41    

Legend:
Removed from v.263  
changed lines
  Added in v.336

  ViewVC Help
Powered by ViewVC 1.1.26