In baselayout1 we could do "/etc/init.d/foobar stop zap start", in baselayout2/OpenRC that is no longer possible.
OpenRC just returns the warning that the specified service has been stopped already and doesn't continue with the "zap start".
See the code in svc_stop_check() in src/rc/runscript.c to see why I have edited the summary.
Basically when stop is called for a service that is already stopped, svc_stop_check exits with a successful error code instead of allowing other commands to be run.
Yeah, that's why I said it will be a bit tricky, we'd have to change some functions, from void to int at least to allow different statuses.
This specific case, wanting to run "stop zap start" sounds a lot like
restart. Restart currently runs "stop start", should we make it run
"stop zap start" so that you can just run restart?
i dont think we want to do that. i dont think "stop" should abort the operation process if a service is already stopped. if it failed to stop, then sure, but that's not the case here.
This has been fixed by commit 34b7632d1d2ed38c7251ac8c2869c8fc416a99f5.