init script behaviour

2010-06-15 Thread Joe Orton
Any opinions on this? I've had a query. What should service start do for a daemon - or more specifically, when should it return? There is inconsistency amongst different current init scripts, two general approaches: 1) fire and forget: start the daemon, return immediately 2) stop and

Re: init script behaviour

2010-06-15 Thread Manuel Wolfshant
On 06/15/2010 03:08 PM, Joe Orton wrote: Any opinions on this? I've had a query. What should service start do for a daemon - or more specifically, when should it return? There is inconsistency amongst different current init scripts, two general approaches: 1) fire and forget: start

Re: init script behaviour

2010-06-15 Thread Colin Walters
On Tue, Jun 15, 2010 at 8:08 AM, Joe Orton jor...@redhat.com wrote: I'd instinctively prefer (1) from a do one thing and do it well perspective; (2) starts down the road of a better/more complex form of service-monitoring/management and ends up doing it really badly in messy sh script in N

Re: init script behaviour

2010-06-15 Thread Casey Dahlin
On Tue, Jun 15, 2010 at 03:30:05PM +0300, Manuel Wolfshant wrote: On 06/15/2010 03:08 PM, Joe Orton wrote: *snip* Thoughts? Well, I'd say it depends on how we define the start part. fire and forget, start and make sure it was started or start and make sure it is running. I'd say fire

Re: init script behaviour

2010-06-15 Thread Chris Adams
Once upon a time, Casey Dahlin cdah...@redhat.com said: I'd say fire and forget or something close for most sysv initscripts. If you want to do better you need a modern tool like systemd/upstart/etc. Trying to do it better in bash just makes for piles of ugly, and the weird failure modes and