Issue #2513 has been updated by Nigel Kersten.

Assigned to set to Nigel Kersten
Priority changed from Normal to High
Target version set to 0.25.0

I'm getting more and more debian people asking me about this bug. Upping to 
High and working on a patch now.
----------------------------------------
Bug #2513: debian cron provider uses hacky enabled? check that fails if insserv 
is installed
http://projects.reductivelabs.com/issues/2513

Author: Nigel Kersten
Status: Accepted
Priority: High
Assigned to: Nigel Kersten
Category: ssh
Target version: 0.25.0
Complexity: Unknown
Affected version: 0.25.0rc1
Keywords: 


<pre>
    def enabled?
        output = update "-n", "-f", @resource[:name], "remove"

        # If it's enabled, then it will print output showing removal of
        # links.
        if output =~ /etc\/rc[\dS].d\/S|not installed/
            return :true
        else
            return :false
        end
    end
</pre>

This fails when insserv is installed as the output format changes.

We should instead be using something like:

<pre>invoke-rc.d --query cron start</pre>

This will return 104 if cron would be started in the current
runlevel, which means that the init.d script symlink exists for the
runlevel.

If it returns 101 or 106, then cron is disabled by policy (but the
init.d script exists).

If it returns 100, then the init.d script does not exist.

If it returns 105, then all bets are off.

<pre>man invoke-rc.d</pre>



-- 
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://reductivelabs.com/redmine/my/account

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

Reply via email to