summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-02-26 14:04:16 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-02-26 14:04:16 +0100
commitbf3d383ae8830fe54cabf4621ef98b1276c25613 (patch)
tree78336eb2c4d1846e2264b3ff752db76a672e2edb
parente47189e03f819e352186f646c22cb6ec6877b076 (diff)
downloadamtterm-bf3d383ae8830fe54cabf4621ef98b1276c25613.tar.gz
add amttool-wsman
-rwxr-xr-xamttool-wsman29
1 files changed, 29 insertions, 0 deletions
diff --git a/amttool-wsman b/amttool-wsman
new file mode 100755
index 0000000..6b94d75
--- /dev/null
+++ b/amttool-wsman
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# args
+action="$1"; shift;
+host="$1"; shift;
+
+# config
+redir_scheme="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_RedirectionService"
+wsman_opts="-h ${host} -P 16992 -u admin -p ${AMT_PASSWORD}"
+#wsman_opts="${wsman_opts} -d 9" # debugging
+wsman_opts="${wsman_opts} --noverifyhost"
+
+##############################################################################
+# go!
+
+case "$action" in
+redir-listen)
+ wsman put ${redir_scheme} ${wsman_opts} -k ListenerEnabled=true
+ ;;
+-h | --help | help)
+ echo "usage: $0 action host"
+ echo "actions:"
+ echo " redir-listen enable redirection service listener"
+ ;;
+*)
+ echo "unknown action: $action (try help)"
+ exit 1
+ ;;
+esac