From 7348c2557b3fe94e09c6a149d82c3ee4a8f02588 Mon Sep 17 00:00:00 2001 From: eriknordmark Date: Fri, 16 Aug 2024 10:12:11 -0700 Subject: [PATCH] Wait if no server or root-certificate.pem file The device-steps.sh will wait forever instead of exit. This shows where something like FDO would fit in. Signed-off-by: eriknordmark --- pkg/pillar/scripts/device-steps.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/pillar/scripts/device-steps.sh b/pkg/pillar/scripts/device-steps.sh index 6f04ec8dd9..254449a15e 100755 --- a/pkg/pillar/scripts/device-steps.sh +++ b/pkg/pillar/scripts/device-steps.sh @@ -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"