I'm not sure if this has been asked before but I hope somebody can point me in the right direction.
Setup:
Attended Sysupgrade
Hotplug enabled/installed - not sure if this can help
Flash Drive (auto-mounted)
Additional customization in flash drive
Todo:
Custom script to install additional configuration and additional user-installed packages
What I'm trying to do:
Auto-run (if possible), the custom script after the sysupgrade is done to do additional setup and install additional packages not available in the openwrt repo
Question:
Is even the Autorun possible?
Can somebody point me in the right direction to do this if possible?
On the one hand auc can't allow injecting custom (not provided by OpenWrt's repositories) packages/ scripts, as this would open the door to command injection attacks against the auc servers - on the other hand, sysupgrade drops to a very limited initramfs like environment to commence the upgrade, what isn't covered for by basefiles' sysupgrade support simply isn't available at that stage (and there isn't any 'plugin' infrastructure beyond that, nor really any means for more complex functionality beyond $WRITE_IMAGE and $REBOOT, the network is down at that point anyways, and what isn't in the image, simply won't be reachable anymore).
At some point you will have to build from source (or at least run the imagebuilder yourself, injecting your own packages/ scripts).
I use the normal rc.local script to install packages on reboot; It will be triggert on every reboot, but on already installed packages it doesn't do anything.