[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/2.6.0-2-104-g203dd6f
Mathias Gug
mathias.gug at canonical.com
Thu Aug 19 21:59:40 UTC 2010
The following commit has been merged in the master branch:
commit 7fb2606f52666f109cfec87a007bb590b45ddd8b
Author: Mathias Gug <mathias.gug at canonical.com>
Date: Wed Aug 18 15:16:34 2010 -0400
Fix init service provider to correctly check the status of services using upstart jobs (LP: #551544).
diff --git a/debian/changelog b/debian/changelog
index b234fa8..31f12af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ puppet (2.6.1~rc2-1) UNRELEASED; urgency=low
* New upstream version:
- fix config.ru file to run puppetmaster as a rack application.
* Rakefile: use system puppet.rb file to detect version.
+ * Fix init service provider to correctly check the status of services
+ using upstart jobs (LP: #551544).
-- Mathias Gug <mathiaz at ubuntu.com> Wed, 18 Aug 2010 15:06:06 -0400
diff --git a/lib/puppet/provider/service/init.rb b/lib/puppet/provider/service/init.rb
index 447c01a..f16585d 100755
--- a/lib/puppet/provider/service/init.rb
+++ b/lib/puppet/provider/service/init.rb
@@ -134,7 +134,15 @@ Puppet::Type.type(:service).provide :init, :parent => :base do
# we just return that; otherwise, we return false, which causes it to
# fallback to other mechanisms.
def statuscmd
- (@resource[:hasstatus] == :true) && [initscript, :status]
+ if @resource[:hasstatus] == :true then
+ # Workaround the fact that initctl status command doesn't return
+ # proper exit codes. Can be removed once LP: #552786 is fixed.
+ if File.symlink?(initscript) && File.readlink(initscript) == "/lib/init/upstart-job" then
+ ['sh', '-c', "LANG=C invoke-rc.d #{File::basename(initscript)} status | grep -q '^#{File::basename(initscript)}.*running'" ]
+ else
+ [initscript, :status ]
+ end
+ end
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list