diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-08-28 16:24:42 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-08-31 11:07:54 -0700 |
commit | 72d45a672a5ea45439f9d4f630063e70872ed8cb (patch) | |
tree | 16a6e3b8f21d8b2309e89191d31eee3e6e61e06f /bin/abrmdcontainer/init.sh | |
parent | b4133b73e86c4f8cbd4284dde9970c2e8216baa4 (diff) |
Modify initialization to remove ownership step
TPM ownership and primary key creation is assumed to be a step that is
executed by the system administrator who will provide the credentials
to pods during startup [Srini]. Now, init only reads the public portion of the
primary key and puts it the host folder.
P9: Remove init.sh. Not needed as initialize will directly talk to device now.
Initialize is called during Step 1 and run_abrmd is called during Step 2
Issue-ID: AAF-409
Change-Id: Id0d1860f257c98045613e90b6b88e37858a9aceb
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'bin/abrmdcontainer/init.sh')
-rwxr-xr-x | bin/abrmdcontainer/init.sh | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/bin/abrmdcontainer/init.sh b/bin/abrmdcontainer/init.sh deleted file mode 100755 index c74a870..0000000 --- a/bin/abrmdcontainer/init.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -set -e - -echo "Shared volume is ${ABRMD_DATA}" -FILE="${ABRMD_DATA}/tpm_status.yaml" -if [ -f $FILE ];then - flag=$(echo "$(cat ${ABRMD_DATA}/tpm_status.yaml)" | sed '/^flag/{s/[^0-9,]//g;y/,/\n/;}') - if [ "$flag" == 0 ];then - # Start DBUS - mkdir -p /var/run/dbus - stdbuf -oL -eL dbus-daemon --system --nofork 2>&1 1> /var/log/dbus-daemon.log & - # Time for Daemon to start before executin next step - sleep 1m - # Start Resource Manager - if [ -z $TPM_SIMULATOR ]; then - echo "Using TPM Hardware for the operations" - tpm2-abrmd & - # Time for abrmd process to start - sleep 1m - state=$( ps aux | grep tpm2-abrmd | grep -v grep ) - echo "Staus of abrmd Process is $state" - 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 - - /abrmd/bin/initialize_tpm.sh - status=$? - if [ $status -eq "0" ]; then - echo "TPM Initialization successful $status" - fi - exit $? - else - echo "TPM is already Initialized" - exit; - fi -else - echo " TPM Status file not found, Hence exiting" - exit; -fi |