Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67557 - service_start and service_started should use extra info to see if the service is really started
Summary: service_start and service_started should use extra info to see if the service...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-14 08:45 UTC by Scott Cytacki
Modified: 2004-10-14 09:09 UTC (History)
0 users

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 Scott Cytacki 2004-10-14 08:45:37 UTC
Occasionally one of my services will die for some reason.  This leaves a file in the ${svcdir} (/var/lib/init.d/started).  Then if I try /etc/init.d/{service} start I get a  
* WARNING:  "{service}" has already been started.
I must delete the file in the ${svcdir}/started, before I can start the service. In most cases the scripts should know how to check if the service is really running, but there is no way to do this, that I can see.

A few ideas for this:
1. If some extra info was saved then this could be avoided.  One idea would be to provide a way for the start method of a service to pass a pid to the svc_start method which could then store this pid in a file.  Then service_started can see if this pid is running.
2. an optional method could be added the init.d scripts like check_status which would allow the script to check if its services are running or not.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2004-10-14 09:09:28 UTC
/etc/init.d/service zap start