Edit rc.local before build custom openwrt

Hi All
I was wondering if it is possible to edit the contents of rc.local before creating the custom firmware?
i have a very basic script that works perfectly every time:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

chmod +x myconfig/vhusbdmipsel
myconfig/vhusbdmipsel

exit 0

Usually I write this little script inside rc.local and this will run the program that is stored inside the folder "myconfig" once the router starts.

currently I want to build my own image where the script would be already added.
This is basically to save me time as I am currently loading this file and script to a few routers every day
Not only takes a long time to SCP, copy the files, reboot, test on several devices, but with a prebuilt firmware, it would still keep the settings after a hard reset.

Thank you for your help in advance
Apologies for any mistakes but English is not my first language.

https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#custom_files

3 Likes

Yep. Thank you
That worked... Slightly different than what I anticipated but worked. Thank you

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.