Browse Source

Do not install artifact_info without a client

Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2.5.x
Ole Petter 4 years ago
committed by Lluis Campos
parent
commit
533a4849d3
  1. 7
      mender-convert-modify
  2. 5
      mender-convert-package

7
mender-convert-modify

@ -303,8 +303,11 @@ fi
run_and_log_cmd "echo 'device_type=${device_type}' > work/device_type"
run_and_log_cmd "sudo install -m 0444 work/device_type work/rootfs/data/mender/"
run_and_log_cmd "echo 'artifact_name=${MENDER_ARTIFACT_NAME}' \
| sudo tee work/rootfs/etc/mender/artifact_info"
if [ "${MENDER_CLIENT_INSTALL}" = "y" ]; then
run_and_log_cmd "echo 'artifact_name=${MENDER_ARTIFACT_NAME}' \
| sudo tee work/rootfs/etc/mender/artifact_info"
fi
log_info "Creating state scripts version file."
case "${MENDER_CLIENT_VERSION}" in

5
mender-convert-package

@ -144,7 +144,6 @@ rootfs_part_sectors=$(((${disk_image_total_sectors} - ${data_part_sectors} - \
rootfs_part_sectors=$(disk_align_sectors ${rootfs_part_sectors} ${MENDER_PARTITION_ALIGNMENT})
device_type=$(cat work/rootfs/data/mender/device_type | sed 's/[^=]*=//')
artifact_name=$(cat work/rootfs/etc/mender/artifact_info | sed 's/[^=]*=//')
# Get the name from the input disk_image
temp_img_name=$(basename "$disk_image")
@ -212,7 +211,7 @@ disk_create_file_system_from_folder "work/rootfs/" "work/rootfs.img" \
log_info "Copying root filesystem image to deploy directory"
run_and_log_cmd "cp --sparse=always work/rootfs.img deploy/${image_name}.${image_fs_type}"
mender_create_artifact "${device_type}" "${artifact_name}" "${image_name}"
mender_create_artifact "${device_type}" "${MENDER_ARTIFACT_NAME}" "${image_name}"
log_info "Creating Mender compatible disk-image"
@ -372,7 +371,7 @@ testscfg_add "MENDER_PARTITIONING_OVERHEAD_KB" "$(((${overhead_sectors} * 512) /
testscfg_add "MENDER_PARTITION_ALIGNMENT" "${MENDER_PARTITION_ALIGNMENT}"
testscfg_add "MENDER_STORAGE_TOTAL_SIZE_MB" "${MENDER_STORAGE_TOTAL_SIZE_MB}"
testscfg_add "MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET" "12582912"
testscfg_add "MENDER_ARTIFACT_NAME" "${artifact_name}"
testscfg_add "MENDER_ARTIFACT_NAME" "${MENDER_ARTIFACT_NAME}"
testscfg_add "MENDER_FEATURES" "${mender_features}"
testscfg_add "DEPLOY_DIR_IMAGE" "${PWD}/deploy"
testscfg_add "MENDER_MACHINE" "${device_type}"

Loading…
Cancel
Save