aboutsummaryrefslogtreecommitdiffstats
path: root/bin/abrmdcontainer/run_abrmd.sh
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-08-23 18:02:57 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-23 18:02:57 +0000
commit7c6ce03e30552e4acc7a065cc05547b08fba82d3 (patch)
tree38e2d2532faae2546c867db62f13d74219dbef7b /bin/abrmdcontainer/run_abrmd.sh
parent572150672972e58d3e2b2f21e5dfd3004bce6b68 (diff)
parent51449dab404b457264e1a36206773b9764241167 (diff)
Merge "Containerize TPM Initialization tool"
Diffstat (limited to 'bin/abrmdcontainer/run_abrmd.sh')
-rwxr-xr-xbin/abrmdcontainer/run_abrmd.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/abrmdcontainer/run_abrmd.sh b/bin/abrmdcontainer/run_abrmd.sh
new file mode 100755
index 0000000..bcfb233
--- /dev/null
+++ b/bin/abrmdcontainer/run_abrmd.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+# Start DBUS
+mkdir -p /var/run/dbus
+stdbuf -oL -eL dbus-daemon --system --nofork 2>&1 1> /var/log/dbus-daemon.log &
+
+# Start Resource Manager
+if [ -z $TPM_SIMULATOR ]; then
+ echo "Using TPM Hardware for the operations";
+ tpm2-abrmd
+else
+ echo "Using TPM Simulator for the opeations";
+ hostip=$(ip route show | awk '/default/ {print $3}');
+ echo "Connecting to $hostip\n";
+ tpm2-abrmd -a $hostip -t socket
+fi