Details
Description
It looks like the install steps do not work 4 out of 5 times, specifically this line
mender-artifact cat <imgname>.sdimg:/etc/hosts | sed "\$a ${IP_OF_MENDER_SERVER_FROM_DEVICE} docker.mender.io s3.docker.mender.io" | mender-artifact cp <imgname>.sdimg:/etc/hosts
I think the problem is not in mender-artifact, but rather that this command style is inherently unsafe: It is reading from, and writing into, the same file at the same time. It should probably be reworked to a style that uses a temporary file and terminates the command in between (it can still be a oneliner, just with ;).