From 51449dab404b457264e1a36206773b9764241167 Mon Sep 17 00:00:00 2001 From: Pramod Raghavendra Jayathirth Date: Thu, 2 Aug 2018 10:41:31 -0700 Subject: Containerize TPM Initialization tool Modifying ABRMD container to support Init tool Change-Id: I8b2f8171688b67567e3ad4a3e4942ae76737bdfc Issue-ID: AAF-342 Signed-off-by: Pramod Raghavendra Jayathirth --- bin/abrmdcontainer/run_abrmd.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bin/abrmdcontainer/run_abrmd.sh (limited to 'bin/abrmdcontainer/run_abrmd.sh') 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 -- cgit 1.2.3-korg