From d55d2dfa4f9fe96ffed95f95ccf3f24bded1c861 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 28 Nov 2018 17:55:18 +0100 Subject: aktualizr and image_types_ota: more curly braces. Just trying to be careful and consistent. I didn't change every variable in places where it seemed like it was obvious that we were dealing with purely local variables. Signed-off-by: Patrick Vacek --- classes/image_types_ota.bbclass | 8 ++++---- recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb | 4 ++-- 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 () { # Calculate image type 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}") - if [ $OTA_ROOTFS_SIZE -lt 0 ]; then + if [ ${OTA_ROOTFS_SIZE} -lt 0 ]; then bbfatal "create_ota failed to calculate OTA rootfs size!" fi eval local COUNT=\"0\" eval local MIN_COUNT=\"60\" - if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then - eval COUNT=\"$MIN_COUNT\" + if [ ${OTA_ROOTFS_SIZE} -lt ${MIN_COUNT} ]; then + eval COUNT=\"${MIN_COUNT}\" fi - dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=$COUNT bs=1024 + dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=${COUNT} bs=1024 mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} } 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() { SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem mkdir -p ${DEPLOY_DIR_IMAGE}/CA - bbwarn "SOTA_CACERT_PATH is not specified, use default one at $SOTA_CACERT_PATH" + bbwarn "SOTA_CACERT_PATH is not specified, use default one at ${SOTA_CACERT_PATH}" if [ ! -f ${SOTA_CACERT_PATH} ]; then bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA" - SOTA_CACERT_DIR_PATH="$(dirname "$SOTA_CACERT_PATH")" + SOTA_CACERT_DIR_PATH="$(dirname "${SOTA_CACERT_PATH}")" openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096 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 bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server" -- cgit v1.2.3-54-g00ecf