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