diff options
| author | cajun-rat <p@beta16.co.uk> | 2017-07-31 17:48:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-31 17:48:55 +0200 |
| commit | 999e261bbc55b2c5c2adf10679996fa56354281f (patch) | |
| tree | fec26fcb13be1ed87e773def0a61149e3d46a6db /classes | |
| parent | 16eb34d9368c12f61c7dcc97253c3b53624bb244 (diff) | |
| parent | 25fa85e0535a4c0ea5d5dea6a7109842da8e1550 (diff) | |
| download | meta-updater-999e261bbc55b2c5c2adf10679996fa56354281f.tar.gz | |
Merge pull request #107 from advancedtelematic/refactor/PRO-3377/secondary-ecus
Split rvi-sota-client into multiple binaries
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 | ||
