Bryan Kearney wrote:
> Has anyone solved status checking for the network service on fedora? 
> Since it always returns success, using 'hastatus => true' does not work. 
> We have some recipes that always cause the network service to restart 
> even when it does not need to.
> 

Override 'pattern'. The daemon's name often doesn't match the service name, and 
the
default pattern sometimes also matches more than it should out of the process 
list (e.g.
the service name is a substring of another process' name).

For example, the autofs service:

service { "autofs":
        ensure    => stopped,
        enable    => false,
        hasstatus => false,
        pattern   => "\bautomount\b",
}

The '\b' matches word boundaries which forces it to match the entire word 
rather than any
substring. While not strictly necessary in this example, I included it for 
completeness.

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

He that would govern others, first should be the master of himself.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to