[PATCH 4086/4086] Properly match downed services when checking status

0 views
Skip to first unread message

Bryan Allen

unread,
Apr 9, 2009, 5:37:33 AM4/9/09
to puppe...@googlegroups.com
---
lib/puppet/provider/service/daemontools.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/provider/service/daemontools.rb b/lib/puppet/provider/service/daemontools.rb
index e8d116a..9499dde 100644
--- a/lib/puppet/provider/service/daemontools.rb
+++ b/lib/puppet/provider/service/daemontools.rb
@@ -124,7 +124,7 @@ Puppet::Type.type(:service).provide :daemontools, :parent => :base do
def status
begin
output = svstat self.service
- return :running if output =~ /\bup\b/
+ return :running if output =~ /:(\s+)up \(/
rescue Puppet::ExecutionFailure => detail
raise Puppet::Error.new( "Could not get status for service %s: %s" % [ resource.ref, detail] )
end
--
1.6.1.1

Luke Kanies

unread,
Apr 11, 2009, 10:06:45 AM4/11/09
to puppe...@googlegroups.com
It'd be good to see tests for this, but +1.
--
If two men agree on everything, you may be sure that one of them is
doing the thinking. -- Lyndon B. Johnson
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Reply all
Reply to author
Forward
0 new messages