* Brian Candler wrote (31/01/06 10:06): > On Tue, Jan 31, 2006 at 09:57:22AM +0000, Chris Lear wrote: >> It's a Gentoo thing. Gentoo starts/stops/restarts services with commands >> like /etc/init.d/servicename start/stop/restart >> >> The init scripts won't start if the process is in a "Running" state, > > Presumably checked by the existence of a pid file? Is gentoo so lame that it > doesn't check to see if there actually *is* a process with that particular > pid?
No, it isn't a plain pid file check. I've just tried it with apache2. # /etc/init.d/apache2 status * status: stopped # /etc/init.d/apache2 start * Starting apache2... apache2: [ ok ] # ls /var/run/apache2.pid /var/run/apache2.pid # rm /var/run/apache2.pid # /etc/init.d/apache2 status * status: started # killall apache2 # /etc/init.d/apache2 status * status: started # /etc/init.d/apache2 zap * Manually resetting apache2 to stopped state. # /etc/init.d/apache2 status * status: stopped [A quick investigation later...] It seems to save a copy of the init script, at the time it was run, in /var/lib/init.d/started, and the presence of a file in there is all it takes to think it's in a started state. /var/lib/init.d contains dependency information as well, it seems. > > That possibility hadn't occurred to me. But I'm a smug FreeBSD user :-) And I'm a smug Gentoo user some of the time. The rest of the time I wish I could update the system quickly. Chris ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Courier-imap mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
