summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-11-29 10:50:51 +0100
committerGitHub <noreply@github.com>2018-11-29 10:50:51 +0100
commit0dd9c75b3f187acca3b4032ac2f1ae002b806275 (patch)
tree895ab496983bba7e67bcf7c22c34d22c90a0a69f
parent2e1eb5bf5ff232dd197e7891aee6efd42b6c27a0 (diff)
parentd55d2dfa4f9fe96ffed95f95ccf3f24bded1c861 (diff)
downloadmeta-updater-0dd9c75b3f187acca3b4032ac2f1ae002b806275.tar.gz
Merge pull request #441 from advancedtelematic/fix/more-curly-braces
aktualizr and image_types_ota: more curly braces.
-rw-r--r--classes/image_types_ota.bbclass8
-rw-r--r--recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb4
2 files changed, 6 insertions, 6 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index 3165b54..9883a68 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -96,17 +96,17 @@ IMAGE_CMD_ota-ext4 () {
96 # Calculate image type 96 # Calculate image type
97 OTA_ROOTFS_SIZE=$(calculate_size `du -ks ${OTA_SYSROOT} | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}") 97 OTA_ROOTFS_SIZE=$(calculate_size `du -ks ${OTA_SYSROOT} | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}")
98 98
99 if [ $OTA_ROOTFS_SIZE -lt 0 ]; then 99 if [ ${OTA_ROOTFS_SIZE} -lt 0 ]; then
100 bbfatal "create_ota failed to calculate OTA rootfs size!" 100 bbfatal "create_ota failed to calculate OTA rootfs size!"
101 fi 101 fi
102 102
103 eval local COUNT=\"0\" 103 eval local COUNT=\"0\"
104 eval local MIN_COUNT=\"60\" 104 eval local MIN_COUNT=\"60\"
105 if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then 105 if [ ${OTA_ROOTFS_SIZE} -lt ${MIN_COUNT} ]; then
106 eval COUNT=\"$MIN_COUNT\" 106 eval COUNT=\"${MIN_COUNT}\"
107 fi 107 fi
108 108
109 dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=$COUNT bs=1024 109 dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=${COUNT} bs=1024
110 mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} 110 mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT}
111} 111}
112 112
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb
index e2d52da..7420983 100644
--- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb
+++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb
@@ -21,11 +21,11 @@ do_install() {
21 SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem 21 SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem
22 SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem 22 SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem
23 mkdir -p ${DEPLOY_DIR_IMAGE}/CA 23 mkdir -p ${DEPLOY_DIR_IMAGE}/CA
24 bbwarn "SOTA_CACERT_PATH is not specified, use default one at $SOTA_CACERT_PATH" 24 bbwarn "SOTA_CACERT_PATH is not specified, use default one at ${SOTA_CACERT_PATH}"
25 25
26 if [ ! -f ${SOTA_CACERT_PATH} ]; then 26 if [ ! -f ${SOTA_CACERT_PATH} ]; then
27 bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA" 27 bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA"
28 SOTA_CACERT_DIR_PATH="$(dirname "$SOTA_CACERT_PATH")" 28 SOTA_CACERT_DIR_PATH="$(dirname "${SOTA_CACERT_PATH}")"
29 openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096 29 openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096
30 openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert 30 openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert
31 bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server" 31 bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server"