Re: s6-rc: oneshot services do not get their name as arg 1
That makes a lot of sense. Thank you! Regards Paul OpenPGP_0x71C7C85A2EA30F62.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: s6-rc: oneshot services do not get their name as arg 1
Thank you for the quick reply! There would be no benefit to doing that, because oneshots do not have instances, so any up or down script knows exactly what service it is starting or stopping. I could think of one benefit: Symlinking the oneshot service directory with other names, e.g. having a oneshot script for setting up the network and symlinking it for different interfaces, so that a change does not have to be made in all the copied scripts (of course its unlikely to have enough interfaces to justify this, but it conveys the idea). Regards Paul OpenPGP_0x71C7C85A2EA30F62.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: s6-rc: oneshot services do not get their name as arg 1
I am wondering why oneshot services do not get their names passed as argument 1, while longruns do. Is there a reason for that? If yes, what is it? If not, will this be added? Longruns being passed their names as argument is a recent addition: it was useful to implement dynamic instances in s6. It's a pure s6 feature, not an s6-rc one; it just so happens that a longrun's name in s6-rc translates to the service directory's name in s6. Oneshots aren't being handled by s6, so they did not benefit from that change. They're only run at the s6-rc level, and s6-rc does not pass service names as arguments. There would be no benefit to doing that, because oneshots do not have instances, so any up or down script knows exactly what service it is starting or stopping. -- Laurent