Browse Source

Merge pull request #277 from NilsOlavKJohansen/master

made it possible to write multiple device types in config file using …
2.3.x
NilsOlavKJohansen 4 years ago
committed by GitHub
parent
commit
5ad0107f83
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      configs/mender_convert_config
  2. 5
      mender-convert-package

5
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}"
}

5
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)

Loading…
Cancel
Save