[Pkg-puppet-devel] Bug#775795: Patch to use /usr/sbin/service in Debian service provider

Stephen Gran sgran at debian.org
Thu Feb 5 09:15:30 UTC 2015


Hi,

This one time, at band camp, Stig Sandbeck Mathisen said:
> 
> Hello,
> 
> Thanks for the patch.  It looks like it has the correct solution, using
> the Debian abstraction layer over the alternative init systems.
> 
> However, I've found a problem with it using the "puppet resource"
> command. Could you see if you find what causes it?
> 
> With puppet 3.7.22-1:
> 
> ,----
> | root at dagon:~# puppet resource service apache2
> | service { 'apache2':
> |   ensure => 'stopped',
> |   enable => 'true',
> | }
> `----
> 
> With your patch:
> 
> ,----
> | root at dagon:~# puppet resource service apache2
> | Error: Could not run: undefined local variable or method `service' for #<Puppet::Type::Service::ProviderDebian:0x000000029b9d88>
> `----

Try this (lightly tested) one instead.  The problem is in the definition
and use of the service command in the first patch.

Cheers,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-usr-sbin-service-in-Debian-service-provider.patch
Type: text/x-diff
Size: 3072 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-puppet-devel/attachments/20150205/98597395/attachment.patch>


More information about the Pkg-puppet-devel mailing list