Hi,
I have some custom script in the root folder of the tezi image to backup few config. This scripts are executed by the prepare and wrapup scripts. When I host the image in a custom http server, the toradex easy installer only downloads the prepare and wrapup scripts. How to configure the easy installer or image.json to download the additional script from the http server?
Hello @jesvinonnet,
Thanks for reaching out! May I know what exactly are these additional scripts executing/performing? Depending on the use case there might be different solutions here.
Hi @rudhi.tx,
Thank you for the reply. 2 main scripts that we use are to create a backup of the configuration and the second one to restore them. Since we have quiet some amount of files, we made these tasks as separate script and then are invoke them accordingly from the prepare and wrapup scripts. I know that the same commands can be executed directly inside the prepare and wrapup scripts, but I would like to have my application specific tasks separated from the image scripts.
Hi @jesvinonnet,
At the moment, TEZI does not have this feature to download additional scripts. You will have to add these tasks into the prepare and wrapup scripts instead. Depending on the use-case an alternative approach would be to include these files into your custom image built with Yocto Project. I hope that helps.
Out of curiosity, would it be possible to send these two scripts here so that I could take a look?
Hi @rudhi.tx,
We have these scripts as part of the custom image build. So these scripts are present inside the tezi tar file. So how does it make a difference in this scenario of having these files into your custom image built with Yocto Project?
The script is very simple. one script is called as backup_config.sh. That will mount the mmcblk0p2 to /var/volatile and take the backup of some files. Eg: network configuration, hostname, time configuration, ssh keys and application related configs. Another script is the restore script that will again mount the mmcblk0p2 to /var/volatile and restore the files form the the previous backup folder.
We have updated the existing prepare and wrapup script to invoke the backup and restore script accordingly. These all script are in the root folder of the tezi image. But when we host this image in an http server, the easy installer only downloads the prepare and wrapup script. Not our backup and restore scripts.
Is making our restore and backup logic as part of the prepare and wrapup script is the only solution in this scenario? Is there any other elegant solution?
Hi @jesvinonnet,
Iām discussing this topic internally and will get back to you with more information. In the meantime, if you make some progress or run into some issues please let us know.
1 Like