Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 371845 - sys-apps/openrc: If service is already stopped, stop exits instead of allowing more commands to be run
Summary: sys-apps/openrc: If service is already stopped, stop exits instead of allowin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: openrc-tracker
  Show dependency tree
 
Reported: 2011-06-15 21:19 UTC by Christian Ruppert (idl0r)
Modified: 2012-01-03 15:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ruppert (idl0r) gentoo-dev 2011-06-15 21:19:46 UTC
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".
Comment 1 William Hubbs gentoo-dev 2011-06-18 21:41:19 UTC
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.
Comment 2 Christian Ruppert (idl0r) gentoo-dev 2011-06-18 21:45:17 UTC
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.
Comment 3 William Hubbs gentoo-dev 2011-07-14 18:38:16 UTC
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?
Comment 4 SpanKY gentoo-dev 2011-07-14 19:08:48 UTC
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.
Comment 5 Christian Ruppert (idl0r) gentoo-dev 2011-12-31 02:37:41 UTC
This has been fixed by commit 34b7632d1d2ed38c7251ac8c2869c8fc416a99f5.

http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=34b7632d