/[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

Contents of /lib/PXElator/amt.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 191 - (show annotations)
Mon Aug 10 12:28:03 2009 UTC (14 years, 8 months ago) by dpavlin
File size: 777 byte(s)
use Intel::AMT from /srv/Intel-AMT/lib/

1 package amt;
2
3 use warnings;
4 use strict;
5
6 use lib '/srv/Intel-AMT/lib/';
7 use Intel::AMT::RemoteControl;
8 use Intel::AMT::NetworkAdministration;
9 use Data::Dump qw/dump/;
10 use Regexp::Common qw/net/;
11
12 use html;
13
14 sub info {
15 my $amt = shift;
16 my ( $passwd, $ip ) = split(/\s+/, $amt);
17 ( $ip, $passwd ) = ( $passwd, $ip ) if $passwd =~ m/$RE{net}{IPv4}/;
18
19 warn "amt $ip ", '*' x length($passwd), "\n";
20
21 $ENV{AMT_HOST} = $ip;
22 $ENV{AMT_PASSWORD} = $passwd;
23
24 my $out;
25
26 $out = qq|power: S| . Intel::AMT::RemoteControl::SystemPowerState
27 . qq|<br>|
28 . qq| <a href="http://$ip:16992/" target="$ip">amt</a>|
29 . qq| <a href="http://$ip:16992/ip.htm" target="$ip">ip</a>|
30 . qq|<br>|
31 . html::pre_dump( Intel::AMT::NetworkAdministration::network_settings )
32 ;
33
34 return $out;
35 }
36
37 1;

  ViewVC Help
Powered by ViewVC 1.1.26