Custom Build Image - post configuration management


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. - /files/etc/config

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