Issue #19675 has been updated by Alexander Fortin. Status changed from Unreviewed to Investigating
---------------------------------------- Bug #19675: debian service provider has a broken test for init scripts being enabled https://projects.puppetlabs.com/issues/19675#change-94504 * Author: Patrick Hemmer * Status: Investigating * Priority: Normal * Assignee: * Category: service * Target version: * Affected Puppet version: 3.1.0 * Keywords: * Branch: ---------------------------------------- The debian service provider does a `invoke-rc.d --quiet --query FOO start` to see if a service is enabled. If that returns a `105` it then looks for `/etc/rc*.d/S*FOO`. This is a broken way of testing whether an init script is enabled. Consider the following scenario: 1) rsync is enabled. `/etc/rc2.d/S50rsync` exists 2) There exists a resource definition: `service { 'sync': enable => false }`. 3) The debian service provider looks for `/etc/rc*.d/*sync` which matches the rsync provider. 4) Puppet thinks the service is enabled and tries to disable it. This results in puppet constantly applying the change when there is no change to be made. The fix: Line 61 of the debian service provider needs to be changed from Dir.glob("/etc/rc*.d/S*#{@resource[:name]}").length to Dir.glob("/etc/rc?.d/S??#{@resource[:name]}").length -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
