I'm trying to figure out how to make cfengine disable a directory. I've
noticed several anomolies...
With this command:
disable:
/usr/local/apache/conf
I get this message:
Disable/rename checking /usr/local/apache/conf
cfengine:prov3-pai: /usr/local/apache/conf is not a plain file - won't
rename/disable without specific destination
I'm not sure what a specific destination is, but I tried adding
'repository = ( /var/cfengine/backups )' in the control section and
that made no difference.
What I really want to do is replace the default /usr/local/apache/conf
directory with a symbolic link to a different one. Since I couldn't
figure out how to do this, I tried using the link command instead to
link all the files under conf. Of course the plain -> version of
link fails because the above disable fails, but this one sort-of works:
links:
/usr/local/apache/conf +>! /home/default_user/apache/conf
The weird thing is, with 'repository = ( /var/cfengine/backups )', all
the old files under conf get moved there, but the directories don't:
drwxr-xr-x 7 root root 4096 Jul 7 12:53 ./
drwxr-xr-x 13 root root 4096 Jul 7 12:57 ../
-rw-r--r-- 1 root root 348 Apr 29 11:52 access.conf
-rw-r--r-- 1 root root 348 Apr 29 11:52 access.conf.default
lrwxrwxrwx 1 root root 41 Jul 7 12:44 devel.conf -> /home/default_user/apache/conf/devel.conf
lrwxrwxrwx 1 root root 41 Jul 7 12:44 httpd.conf -> /home/default_user/apache/conf/httpd.conf
-rw-r--r-- 1 root root 43740 Apr 29 11:52 httpd.conf.default
-rw-r--r-- 1 root root 12965 Apr 29 11:52 magic
-rw-r--r-- 1 root root 12965 Apr 29 11:52 magic.default
lrwxrwxrwx 1 root root 41 Jul 7 12:44 mime.types -> /home/default_user/apache/conf/mime.types
-rw-r--r-- 1 root root 15020 Apr 29 11:52 mime.types.default
lrwxrwxrwx 1 root root 46 Jul 7 12:44 production.conf -> /home/default_user/apache/conf/production.conf
lrwxrwxrwx 1 root root 42 Jul 7 12:44 README.html -> /home/default_user/apache/conf/README.html
-rw-r--r-- 1 root root 357 Apr 29 11:52 srm.conf
-rw-r--r-- 1 root root 357 Apr 29 11:52 srm.conf.default
drwxr-xr-x 2 root root 4096 Apr 29 17:00 ssl.crl/
lrwxrwxrwx 1 root root 38 Jul 7 12:53 ssl.crt -> /home/default_user/apache/conf/ssl.crt/
drwxr-xr-x 2 root root 4096 Apr 29 17:00 ssl.crt_1120765986_Thu_Jul__7_12_53_06_2005_.cfsaved.dir/
drwxr-xr-x 2 root root 4096 Apr 29 17:00 ssl.csr/
lrwxrwxrwx 1 root root 38 Jul 7 12:53 ssl.key -> /home/default_user/apache/conf/ssl.key/
drwx------ 2 root root 4096 Apr 29 17:00 ssl.key_1120765986_Thu_Jul__7_12_53_06_2005_.cfsaved.dir/
drwxr-xr-x 2 root root 4096 Apr 29 17:00 ssl.prm/
lrwxrwxrwx 1 root root 41 Jul 7 12:44 startup.pl -> /home/default_user/apache/conf/startup.pl
lrwxrwxrwx 1 root root 40 Jul 7 12:44 user.conf -> /home/default_user/apache/conf/user.conf
I've also tried linking everything under the apache directory,
excluding everything _but_ conf, but this didn't seem to work either:
links:
/usr/local/apache +>! /home/default_user/apache
exclude=[^(conf)]
This still seemed to link everything under the apache directory, not
just conf.
Any suggestions would be appreciated,
Warren
|