[RFC] Add oneshot capability
This is a simple solution to address #23.
- To disable a oneshot, simply chmod -x it. I guess a package would have to mark these as
conf_files? That does mean if they are edited, that there will be extra files in there (XX-thing.sh.new-ver) but those won't match the glob and it should be fine. - I had suggested earlier there be "early boot" and "late boot" scripts, but given the nature of how runit starts services, this is silly since you can't really know if the services will all be started or not. This will suffice for the main use cases, which things like alsa and iptables.
- I also had suggested earlier that locations like
/etc/runit/oneshotbe used, but/etc/rc.local.dis a thing on other distributions, so I think that's more of a normal location to go with.
Comments? Questions?
I like the idea, but not the implementation. I'd rather have these live under /etc/runit and be part of the 1 and 3 scripts.
My 2 cents anyway.
I also like the idea, but not the implementation.
Putting this in /etc/runit/2 will block starting up, should the activation take time, or worst, hang forever.
I have never liked systemd's A start job is running.
IMHO, making new services in runsvdir state, that sv down themselves after all of its sub-initialization done is better (I don't even sure if it's workable, I may try in this weekend).
But the purpose of this is nothing more than to provide a mechanism for packages to add snippets to /etc/rc.{local,shutdown}. It's stuff you'd wind up putting there anyway.
This seems more robust than a service that sv downs itself.
But the purpose of this is nothing more than to provide a mechanism for packages to add snippets to
/etc/rc.{local,shutdown}. It's stuff you'd wind up putting there anyway.This seems more robust than a service that
sv downs itself.
I was talking about a service named oneshot in /etc/sv, that will activate a list of drop-in in some folder.
Talking about this, I think that service doesn't need to shut it down themselves, for running list of rc.shutdown on finish. So, wasting 1 do-nothing service, instead of multiple service.
This is awesome! It is simple and flexible. Can this be merged? :)
https://github.com/void-linux/void-runit/issues/23#issuecomment-1506310606