diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 72d7df5..ac7cb60 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -146,6 +146,8 @@ IMAGE_CMD_ostree () { | |||
146 | fi | 146 | fi |
147 | 147 | ||
148 | # deploy SOTA credentials | 148 | # deploy SOTA credentials |
149 | mkdir -p var/sota | ||
150 | |||
149 | if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" ]; then | 151 | if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" ]; then |
150 | EXPDATE=`openssl pkcs12 -in ${SOTA_AUTOPROVISION_CREDENTIALS} -password "pass:" -nodes 2>/dev/null | openssl x509 -noout -enddate | cut -f2 -d "="` | 152 | EXPDATE=`openssl pkcs12 -in ${SOTA_AUTOPROVISION_CREDENTIALS} -password "pass:" -nodes 2>/dev/null | openssl x509 -noout -enddate | cut -f2 -d "="` |
151 | 153 | ||
@@ -153,7 +155,6 @@ IMAGE_CMD_ostree () { | |||
153 | bberror "Certificate ${SOTA_AUTOPROVISION_CREDENTIALS} has expired on ${EXPDATE}" | 155 | bberror "Certificate ${SOTA_AUTOPROVISION_CREDENTIALS} has expired on ${EXPDATE}" |
154 | fi | 156 | fi |
155 | 157 | ||
156 | mkdir -p var/sota | ||
157 | cp ${SOTA_AUTOPROVISION_CREDENTIALS} var/sota/sota_provisioning_credentials.p12 | 158 | cp ${SOTA_AUTOPROVISION_CREDENTIALS} var/sota/sota_provisioning_credentials.p12 |
158 | if [ -n "${SOTA_AUTOPROVISION_URL_FILE}" ]; then | 159 | if [ -n "${SOTA_AUTOPROVISION_URL_FILE}" ]; then |
159 | export SOTA_AUTOPROVISION_URL=`cat ${SOTA_AUTOPROVISION_URL_FILE}` | 160 | export SOTA_AUTOPROVISION_URL=`cat ${SOTA_AUTOPROVISION_URL_FILE}` |
@@ -161,6 +162,9 @@ IMAGE_CMD_ostree () { | |||
161 | echo "SOTA_GATEWAY_URI=${SOTA_AUTOPROVISION_URL}" > var/sota/sota_provisioning_url.env | 162 | echo "SOTA_GATEWAY_URI=${SOTA_AUTOPROVISION_URL}" > var/sota/sota_provisioning_url.env |
162 | fi | 163 | fi |
163 | 164 | ||
165 | if [ -n "${SOTA_SECONDARY_ECUS}" ]; then | ||
166 | cp ${SOTA_SECONDARY_ECUS} var/sota/ecus | ||
167 | fi | ||
164 | 168 | ||
165 | # Creating boot directories is required for "ostree admin deploy" | 169 | # Creating boot directories is required for "ostree admin deploy" |
166 | 170 | ||