toltec icon indicating copy to clipboard operation
toltec copied to clipboard

Add systemd generator for entware init scripts to toltec

Open Eeems opened this issue 1 year ago • 3 comments

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.

Eeems avatar Dec 16 '23 21:12 Eeems

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?

Eeems avatar Dec 16 '23 21:12 Eeems

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.

Eeems avatar Dec 17 '23 00:12 Eeems

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.

Eeems avatar May 23 '24 05:05 Eeems