Skip to content

Commit

Permalink
Wait if no server or root-certificate.pem file
Browse files Browse the repository at this point in the history
The device-steps.sh will wait forever instead of exit. This shows where
something like FDO would fit in.

Signed-off-by: eriknordmark <[email protected]>
  • Loading branch information
eriknordmark committed Sep 2, 2024
1 parent 2ab4409 commit 7348c25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/pillar/scripts/device-steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,10 @@ if [ ! -s "$DEVICE_CERT_NAME" ]; then
else
echo "$(date -Ins -u) Using existing device key pair"
fi
if [ ! -s $CONFIGDIR/server ] || [ ! -s $CONFIGDIR/root-certificate.pem ]; then
echo "$(date -Ins -u) No server or root-certificate to connect to. Done" | tee /dev/console
exit 0
fi
while [ ! -s $CONFIGDIR/server ] || [ ! -s $CONFIGDIR/root-certificate.pem ]; do
echo "$(date -Ins -u) No server or root-certificate to connect to. Wait for them" | tee /dev/console
sleep 10
done
if [ -c $TPM_DEVICE_PATH ] && ! [ -f $DEVICE_KEY_NAME ]; then
echo "$(date -Ins -u) device-steps: TPM device, creating additional security certificates"
Expand Down

0 comments on commit 7348c25

Please sign in to comment.