cmprovision
cmprovision copied to clipboard
Copying files via postinstall scripts
Hello,
I understand that the postinstall script is running from the CM4 that is being provisioned (source).
Is it possible to copy some files from the cmprovision server to the CM4 that is being provisioned?
Is it possible to use wget or anything similar?
Thank you.
Yes. Just toss your file in /var/lib/cmprovision/public/uploads
curl --retry 10 --silent --show-error -g -o myfile http://$SERVER/uploads/myfile
See the existing post-installation scripts for an example on how to mount a partition at for example /mnt first. Can then use -o /mnt/myfile
I got it to work, thank you @maxnet!
# file is in /var/lib/cmprovision/public/splash.png
wget -O /mnt/boot/splash.png http://172.20.0.1/splash.png