Daniel Pittman wrote:
> Russell Jackson <[EMAIL PROTECTED]> writes:
> 
>> I've had a number of instances where simply doing a grep
>> '${service-name}' winds up giving a false positive. Example:
>>
>> $ ps auxww | grep -v grep | grep acpid
>> root        15  0.0  0.0     0    0 ?        S<   Jul11   0:00 [kacpid]
>>
>> acpid isn't running, but the kacpid kernel thread makes puppet think it is; 
>> so, it keeps
>> running service acpid stop on every run. Of course, to top it off, the 
>> centos4 init script
>> always returns a zero exit status value.
>>
>> Suggested fix: use the pattern '\<${service-name}\>' instead.
>>
>> Can anyone think of a case where this wouldn't work as intended?
> 
> Yes: service {"ntp:"}, which runs ntpd; try: '\<${service_name}d?\>'
> 
> (Also, on Debian, service {"puppet":} which runs puppetd.)
> 

Yes, but the init scripts actually work for those ;-).

I'm not sure what the best solution is, but it doesn't seem like the default 
behavior
should rely on partial string matches to work around the fact that the service 
name
doesn't match the process name.

-- 
Russell A. Jackson <[EMAIL PROTECTED]>
Network Analyst
California State University, Bakersfield

The best book on programming for the layman is "Alice in Wonderland";
but that's because it's the best book on anything for the layman.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to