Ooops, I spoke to soon, after adding the patch looks like I get noise now:

cfengine:sundev3: Link (/etc/rc3.d/S92os_mgmt->/etc/init.d/os_mgmt) exists.
cfengine:sundev3: Linking files /etc/rc3.d/S92os_mgmt -> /etc/init.d/os_mgmt
cfengine:sundev3: Couldn't link /etc/init.d/os_mgmt to /etc/rc3.d/S92os_mgmt
cfengine:sundev3: symlink: File exists


where the cfengine rule is:
links:
    /etc/rcS.d/S99os_mgmt               -> /etc/init.d/os_mgmt

Any help would be appreciated.



----- Original Message -----
From: Mark Burgess <[EMAIL PROTECTED]>
To: JIM AMANATIDIS (BLOOMBERG/ 731 LEXIN)
Cc: [email protected]
At:  2/07  9:24:45


Try again (keep away from the electrostatic mouse...)

Jim,

I am a little puzzled by this. It seems that the code has been broken
for some time. I can see that part of it happened during some type
optimizations, but I can only apologize for not seeing this before
now. ("It used to work, honest guv..")

Well, please try the latest patches in svn. I believe this works
again. Sorry for the inconvenience.

Mark

JIM AMANATIDIS, BLOOMBERG/ 731 LEXIN wrote:
> According to the documentation, the following rule should remove the symbolic 
link if the target is not present, but it doesn't, it leaves the dead link. Is 
there a fix/work-around?
> 
> links:
>     /usr/bin/brsh -> /bb/bin/brsh nofile=kill
> 
> Currently running version 2.1.21, and gone through link.c source code.  On 
line 472, we have code:
> 
> if (!nofile)
>   {
>   if (stat(absto,&buf) == -1)
>      {
>      return(false);  /* no error warning, since the higher level routine uses 
this */
>      }
> 
> 
> Given that nofile=kill will result in nofile being set to 0, this condition is
executed and since the symbolic link exists, it simply returns.
> 
> Later in the code on line 621, we have code
> 
>       if (!nofile)
>          {
>          KillOldLink(from,ptr->defines);      /* Check whether link points 
somewhere */
>          return true;
>          }
> 
> Which would remove this symlink if the target is present, but it never gets 
here.
> 
> Any help would be appreciated. Thanks - Jim
> 
> 
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 


Mark Burgess

Web: http://www.iu.hio.no/~mark
Tlf: +47 22453272
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to