help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run Once


From: Jamie Wilkinson
Subject: Re: Run Once
Date: Sat, 1 Mar 2003 09:38:54 +1100
User-agent: Mutt/1.5.3i

This one time, at band camp, Nathan Hubbard wrote:
>
>
>So, does anyone know of the easiest way to guarantee a task will run once?  
>I'm looking to make sure every  machine runs a command one time...it 
>doesn't matter when, just that it does it once.  Any ideas?  

You need to set some flag to indicate that the command has been run, and
test for it.  For example, on my Red Hat boxes, I need to run chkconfig only
if the service hasn't already been enabled (or disabled, depending) on some
systems.  So I do some funky stuff in shellcommands to do the test and set
a class, and then if the class is defined run chkconfig to turn on or off
the service.

-- 
jaq@spacepants.org                           http://spacepants.org/jaq.gpg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]