help-cfengine
[Top][All Lists]
Advanced

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

tidy links=tidy


From: Alan Silver
Subject: tidy links=tidy
Date: Tue, 16 Dec 2003 11:03:47 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925

Hi all:

I was hoping someone could help me decipher the behaviour of my config.

I am running cfengine 2.0.8p1 on a solaris 8 (sparc) machine.
I added the following line to one of my configs and it wreaked havoc on me.


In the tidy section of my config, I added the following
  # cfenvd
  /etc     pat=cfenvd              r=0 age=0 links=tidy


I had just removed an rc script (/etc/init.d/cfenvd) which is a shell script to start and stop cfservd and cfenvd.

My goal was to clean up any dead links in my rc scripts that pointed to the /etc/init.d/cfenvd, which no longer existed.

When I ran with this command, it deleted a whole bunch of sym links in /etc including some very valid sym links.

When I ran this command in debug mode (d 2 actually), I noticed that it would incorrectly state that a link was dead if the path to the link included ".." in some relative path name. Links that were absolute or were relative like ./file/to/path were ok.

Here is some output from my debug mode run:
IgnoreFile(init)
TidyParticularFile(/etc/init,init)
Checking for dead links
KillOldLink(/etc/init)
CompressPath(/etc/init,/etc/../sbin/init)
cfengine:sirius: /etc/init is a link which points to sbin/init, but that file doesn't seem to exist


Problem is that /sbin/init does indeed exist.
Needless to say I caused pain and suffering because of that command.

So, I am curious if this behaviour was to be expected and my configuration was poor or if this is a bug?

Thanks for the help and input

al





reply via email to

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