2009/8/6 martin f krafft <[email protected]>:
> also sprach Micah Anderson <[email protected]> [2009.08.06.1659 +0200]:
>> I'm not sure it is a good idea to create a class called 'cron' with a
>> service 'cron' and package 'cron' and not get into namesapce problems
>> with the cron native-type.
>
> It works on all machines except those using insserv. I hope puppet
> doesn't have namespace collisions between services, classes,
> packages, and types.
>
>> If I were to take a guess, I would guess that your problem is that on
>> every run puppet is doing this state change (setting cron/enable from
>> false to true). Is that what you are experiencing?
>
> Exactly that. I get mail from logcheck every 30 minutes with this
> line:
>
>  (//Node[default]/cron/Service[cron]/enable) enable changed 'false' to 'true'

I see the problem.

    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

This is how it works out whether it is enabled or not, and it's not
matching when insserv is installed as the output differs.

The output looks like:

insserv: remove service /etc/init.d/../rc1.d/S17cron

when insserv is installed, but when it isn't, it looks like

 /etc/rc1.d/S17cron

There must be a better way to do this...



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to