Hi Jim, thanks for the message. I will check this out tomorrow, when I have not been drinking :-)
M JIM AMANATIDIS, BLOOMBERG/ 731 LEXIN wrote: > I believe what is needed is a "return" in link.c > > what it is now: > > 635 CfLog(cfsilent,OUTPUT,""); > 636 return(true); > 637 } > 638 } > 639 } > 640 > 641 return DoLink(from,to,lp->defines); > 642 } > > > what I think it should be: > > 635 CfLog(cfsilent,OUTPUT,""); > 636 return(true); > 637 } > 638 } > 639 return(true); > 640 } > 641 > 642 return DoLink(from,to,lp->defines); > > Thanks - Jim > > > ----- Original Message ----- > From: JIM AMANATIDIS (BLOOMBERG/ 731 LEXIN) > To: [EMAIL PROTECTED] > Cc: [email protected] > At: 2/15 10:49:05 > > 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
