Insert my script shell inside firmware

Hi

I would like to include one of my "BASH" script directly in the firmware.
Like that, if the customer does a "RESET FACTORY" by mistake, I would not have to reinstall all my scritps.

If I put my script in the "/ usr / perso" directory and make it executable, it works perfectly.

For example, consider the script "test.sh", below:
#! / Bin / sh
echo "Hello"
exit
#############
./test.sh
Hello
#############

But if I do a "RESET FACTORY", the script disappears.
How does the "make menuconfig" declare this file ???

Thank you for your help.
Regards
Francesco

See https://lede-project.org/docs/guide-developer/use-buildsystem#custom_files how to include custom files in your firmware image.

Thanks Thomas
It's very easy.
I test tomarrow and i return my result on this forum.
Regards
Francesco

If you intend to use BASH-specific things, don't forget to also include bash package in your custom firmware, as by default ash is included and it doesn't support everything bash does.

Thank you Thomas & Shangri
The procedure is really very easy.
So I made my changes.
Thank you for answering.
Regards
Francesco