bug-cfengine
[Top][All Lists]
Advanced

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

Re: tidy bug?


From: Bas van der Vlies
Subject: Re: tidy bug?
Date: Wed, 07 Mar 2001 13:59:48 +0100 (MET)

On 22-Feb-2001 address@hidden wrote:
> On 22 Feb, Bas van der Vlies wrote:
>> 
>> On 22-Feb-2001 Bas van der Vlies wrote:
>>> 
>>> On 20-Feb-2001 address@hidden wrote:
>>>> On 20 Feb, Bas van der Vlies wrote:
>>>>> Hello,
>>>>> 
>>>>>  I'm using cfengine 1.6.2 on Solaris 7 compiled with gcc. 
>>>>> 
>>>>>  i want to remove the .profile from the home directories with the
>>>>>  following
>>>>>  cfengine script:
>>>>> 
>>>>> ==========================================================================
>>>>> ==
>>>>> =
>>>>> control:
>>>>> 
>>>>>   MountPattern =  ( /export/home )
>>>>>   HomePattern  = ( web* )
>>>>> 
>>>>>   actionsequence = ( tidy )
>>>>> 
>>>>> 
>>>>> tidy:
>>>>>   home
>>>>>         pattern=.profile age=0
>>>>> ==========================================================================
>>>>> ==
>>>>> =
>>>>> 
>>>>> 
>>>>> When this script is run i get the an the following output: -v mode
>>>>> ---------------------------------------------------------------------
>>>>> Tidying by directory
>>>>> ---------------------------------------------------------------------
>>>>> cfengine:training: Tidying home directories
>>>>> Tidying /export/home/web01...
>>>>> Segmentation Fault
>>>>> 
>>>>> When this script is run i get the an the following output: -d1 mode
>>>>> SensibleFile(/export/home/web01,.profile)
>>>>> Filename is not suspicious
>>>>> IgnoreFile(.profile)
>>>>> WildMatch(.profile,.profile)
>>>>> Segmentation Fault
>>>>> 
>>>>> Does somebody else also have this problem?
>>>>> 
>>>>> 
>>>>> ********************************************************************
>>>>> *                                                                  *
>>>>> *  Bas van der Vlies                     e-mail: address@hidden      *
>>>>> *  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
>>>>> *  Kruislaan 415                         fax:    +31 20 6683167    *
>>>>> *  1098 SJ Amsterdam                     WWW:    www.sara.nl       *
>>>>> *                                                                  *
>>>>> ********************************************************************
>>>> 
>>>> Never seen it. Can you run in gdb to find the problem?
>>>> 
>>>> M
>>> 
>>> 
>>> Mark,
>>> 
>>>  I have found the problem it is in 1.6.2 and 1.6.3. It is in
>>>  tidy.c.
>>>    if (logging_this)
>>>       {
>>>       printf("Bas \n");
>>> /*
>>>       fprintf(VLOGFP,"cf: rm %s\n",path);
>>> */
>>>       printf("Bas2 \n");
>>>       }
>>> 
>>> 
>>> I removed the fprintf line and everything works fine. VLOGFP has no value
>>> in
>>> the first level (/export/home/web). In the SUB-levels it is oke. Can i
>>> disable
>>> this feature?
>>> 
>>>                 Regards
>> 
>> I have a quick fix: (tidy.c)
>> 
>>    if (logging_this)
>>       {
>>       if (VLOGFP)  /* check if it has an value Bas van der Vlies */
>>         fprintf(VLOGFP,"cf: rm %s\n",path);
>> 
>> ********************************************************************
>> *                                                                  *
>> *  Bas van der Vlies                     e-mail: address@hidden      *
>> *  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
>> *  Kruislaan 415                         fax:    +31 20 6683167    *
>> *  1098 SJ Amsterdam                     WWW:    www.sara.nl       *
>> *                                                                  *
>> ********************************************************************
> 
> 
> 
> 
> It's not impossible that it might be a bug in gcc...I have never
> seen this problem. I suppose it's harmless to comment out
> the line concerned for now.
> 
> Mark
> 

Mark,

 I have ran into the same problem on IRIX 6.5.6/6.5.10 with the native
 C-compiler (7.3.1.1). 
 
 The problem is that the VLOGFP variable is not initialized for the
 top most directory. The best solutions is the following (tidy.c):

if (age_match && size_match)
   {
   if (logging_this)
      {
       if (VLOGFP)
         fprintf(VLOGFP,"cf: rm %s\n",path);
     
      }

                Regards


********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: address@hidden      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                     WWW:    www.sara.nl       *
*                                                                  *
********************************************************************



reply via email to

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