Set classes based on what kind of file /srv/www is.

http://www.cfengine.org/manuals/cf3-reference.html#Function-islink
http://www.cfengine.org/manuals/cf3-reference.html#Function-isplain
http://www.cfengine.org/manuals/cf3-reference.html#Function-isdir

Conditionals should allow you to avoid any race conditions.

Let me know if you need specific examples, or if that is enough to go on.

On Thu, Nov 26, 2009 at 12:35 PM, Robert Markula <robert.mark...@gmx.net> wrote:
> Robert Markula wrote:
>> files:
>>       SRV_APACHE::
>>               "/var/www/."
>>                       rename => MoveTo("/srv/www/.""),
>>                       perms => PermsChgrp("www-data"),
>>                       create => "true";
>>               "/var/www"
>>                       link_from => LinkFrom("/srv/www""),
>>                       perms => PermsChgrp("www-data");
>
>
> Oh, nearly forgot the libs:
>
> body rename MoveTo(newname) {
>        newname => "$(newname)";
> }
>
> body link_from LinkFrom(source) {
>        source => "$(source)";
>        link_type => "symlink";
> }
>
> Cheers,
> Robert
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
>
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to