diff options
author | kraxel <kraxel> | 2008-12-19 14:53:11 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2008-12-19 14:53:11 +0000 |
commit | 9baa8aadc712b981108d6fa1796dec23c0dc96fe (patch) | |
tree | 51760a00d2f623586e591e86b0f599a66dc7c300 | |
parent | 6815e82a8ee41514301b19a4aec1f253bbda2684 (diff) | |
download | amtterm-9baa8aadc712b981108d6fa1796dec23c0dc96fe.tar.gz |
- special command support for amttool.
-rwxr-xr-x | amttool | 27 | ||||
-rw-r--r-- | amttool.man | 30 |
2 files changed, 47 insertions, 10 deletions
@@ -28,6 +28,18 @@ my %rcc = ( "powercycle" => "19", ); +my %rccs = ( + "nop" => "0", + "pxe" => "1", + "hd" => "2", + "hdsafe" => "3", + "diag" => "4", + "cd" => "5", +); +my %rccs_oem = ( + "bios" => 0xc1, +); + # incomplete list my %pt_status = ( 0x0 => "success", @@ -267,8 +279,9 @@ sub print_network_info() { } } -sub remote_control($) { +sub remote_control($$) { my $command = shift; + my $special = shift; my @args; my $hostname = $nas->GetHostName()->paramsout; @@ -279,10 +292,14 @@ sub remote_control($) { printf "execute: %s\n", $command; push (@args, SOAP::Data->name('Command' => $rcc{$command})); push (@args, SOAP::Data->name('IanaOemNumber' => 343)); - if (defined($amt_arg) && $amt_arg eq 'bios') { + if (defined($special) && defined($rccs{$special})) { + push (@args, SOAP::Data->name('SpecialCommand' + => $rccs{$special} )); + } + if (defined($special) && defined($rccs_oem{$special})) { push (@args, SOAP::Data->name('OEMparameters' => 1 )); - push (@args, SOAP::Data->name('SpecialCommand' => 0xC1 )); - push (@args, SOAP::Data->name('SpecialCommandParameter' => 0)); + push (@args, SOAP::Data->name('SpecialCommand' + => $rccs_oem{$special} )); } do_soap($rcs, "RemoteControl", @args); } else { @@ -374,7 +391,7 @@ if ($amt_command eq "info") { check_amt_version(2,5); configure_network(@ARGV); } elsif ($amt_command =~ m/^(reset|powerup|powerdown|powercycle)$/) { - remote_control($amt_command); + remote_control($amt_command, $amt_arg); } else { print "unknown command: $amt_command\n"; } diff --git a/amttool.man b/amttool.man index 5521e10..1e6aa20 100644 --- a/amttool.man +++ b/amttool.man @@ -24,17 +24,16 @@ For more inforamtions on Intel AMT check amt-howto(7). .B info gather information (default). .TP -.B reset [ bios ] -reset machine. Optional bios argument asks for the BIOS boot -messages being redirected to serial-over-lan. +.B reset [ special ] +reset machine, with optional special command (see section below). .TP -.B powerup [ bios ] +.B powerup [ special ] turn on machine. .TP .B powerdown turn off machine. .TP -.B powercycle [ bios ] +.B powercycle [ special ] powercycle machine. .TP .B netinfo @@ -60,6 +59,27 @@ are the DNS Servers. If no IP configuration is specified the tool tries to configure the machine in shared mac address mode with dhcp, otherwise in separate mac address mode with static IP address. Default for dns1 is the gateway address, for dns2 it is 0.0.0.0. +.SH SPECIAL COMMANDS +Special commands can optionally be specified for reset, powerup and +powercycle. They change the default boot behavior of the machine. +.TP +.B bios +Asks for the BIOS boot messages being redirected to serial-over-lan. +.TP +.B pxe +Network boot via PXE. +.TP +.B hd +Boot from local disk. +.TP +.B hdsafe +Fixme. +.TP +.B diag +Fixme. +.TP +.B cd +Boot from CD/DVD. .SH ENVIRONMENT .TP .B AMT_PASSWORD |