[Top][All Lists]

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

Copying files and doing things

From: Kai Großjohann
Subject: Copying files and doing things
Date: Sat, 25 Jan 2003 16:40:11 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu)

I've kludged up my own config file copying script and directory
structure.  It works like this: I have a shell script which looks for
directories under /var/lib/cfengine2/files.  The script also has a
list of CFengine classes to check.

As an example, suppose there is a directory
/var/lib/cfengine2/files/etc/apt/sources.list/ with two files patty
and any in it.  Then the script will create a file
/etc/apt/sources.list.  On host patty, it's a copy of
/var/lib/cfengine2/files/etc/apt/sources.list/patty, and on all other
hosts, it's a copy of the file `any' in the same directory.
The file is not copied if source and destination are equal.

I would like to invoke a shell command, depending on the file that
has been copied.  For example, if a new /etc/auto.master has been
installed, it seems to be useful to say "/etc/init.d/autofs restart".

Does somebody have a suggestion how to do that?

Can my copying script, invoked from a shellcommands action, easily
communicate with the rest of cfengine so that cfengine can invoke the
Ambibibentists unite!

reply via email to

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