From 72d45a672a5ea45439f9d4f630063e70872ed8cb Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Tue, 28 Aug 2018 16:24:42 -0700 Subject: 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 --- bin/abrmdcontainer/init.sh | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 bin/abrmdcontainer/init.sh (limited to 'bin/abrmdcontainer/init.sh') 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 -- cgit 1.2.3-korg