toltec
toltec copied to clipboard
Add systemd generator for entware init scripts to toltec
Package information We should have a systemd generator for entware init scripts (found in /opt/etc/init.d).
Reason for addition This will allow doing things like installing entware's cron package and then setting it up to run on startup.
More context This will remove the need for systemd specific packages to be created.
I noticed a reference to /opt/etc/init.d/rc.unslung start
in one of the generic entware install scripts. Perhaps we should use this instead?
Upon reviewing the systemd.generator documentation, it looks like generators will not work, as it runs too early in the boot process. Having a systemd service that runs after opt.mount
to create and update service files might be worth it, though. Perhaps a template unit.
A template unit is what I settled on. Upon reviewing rc.unslung
, it didn't really make sense to run another init system underneath systemd. From what I understand, it's shipped with entware for systems where you don't have the ability to hook into the main init system like we do, and is indended to be run from your user session. Since we have the ability to hook into our init system, it makes more sense to just have systemd handle the services, and to provide a helper utility to make it easier for users.