Custom Build Image - post configuration management

Greetings,

I'm a first time image compiler (yet to install). Is there a method that would allow me to dynamically manage configuration upon first boot? I see there is a method to dump a file using /files/etc/config, but how can I modify existing files?

Can I execute a shell script using the as a chroot? Or run a shell script when the device booted up the first time. use case #1: modify /etc/ssl/openssl.cnf.

https://openwrt.org/docs/guide-developer/quickstart-build-images - /files/etc/config

https://openwrt.org/docs/guide-developer/uci-defaults

If the file is not a UCI config, you can use CLI editors such as sed or awk.
Or simply replace the whole config.