diff --git a/configs/mender_convert_config b/configs/mender_convert_config index 94386f0..10c3783 100644 --- a/configs/mender_convert_config +++ b/configs/mender_convert_config @@ -227,9 +227,10 @@ source configs/mender_grub_config # You might want to override this to e.g provide state-scripts or providing # a private key to sign your artifact. mender_create_artifact() { - local -r device_type="${1}" + local -r device_types="${1}" local -r artifact_name="${2}" local -r image_name="${3}" + local -r all_device_types="$(for device_type in $device_types; do echo " --device-type $device_type"; done)" mender_artifact=deploy/${image_name}.mender log_info "Writing Mender artifact to: ${mender_artifact}" @@ -240,5 +241,5 @@ mender_create_artifact() { --file work/rootfs.img \ --output-path ${mender_artifact} \ --artifact-name ${artifact_name} \ - --device-type ${device_type}" + ${all_device_types}" } diff --git a/mender-convert-package b/mender-convert-package index 44c7237..a797bca 100755 --- a/mender-convert-package +++ b/mender-convert-package @@ -151,7 +151,10 @@ temp_img_name=$(basename "$disk_image") # Strip the image suffix from temp_img_name and set the original image name as # the output image name -image_name="${temp_img_name%.*}-${device_type}-mender" +image_name="${temp_img_name%.*}" + +#Adds device types to the filename and replaces whitespace with + to seperate device types. +image_name="${image_name}-$(sed 's| |+|g' <<< $device_type)-mender" actual_rootfs_size=$(sudo du -s --block-size=512 work/rootfs | cut -f 1)