bug-cfengine
[Top][All Lists]
Advanced

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

Re: Directory creation/copy problem in Windows client


From: Mark . Burgess
Subject: Re: Directory creation/copy problem in Windows client
Date: Tue, 23 Apr 2002 07:23:14 +0200 (MET DST)

David, thanks a lot for your testing on windows. I have been hoping
for someone to get interested in windows for a while (because I cannot).
I would like to hear from Martin Andrews on this point, since the
particular code you mention is a patch he wrote for windows.

Apart from that, I think everyone would be interested to know your experiences
with using cfengine on windows over time. One thing that was never
finished by my students was ACLs on directories (if I remember rightly)
mainly because of poor documentation about the windows API. Perhaps,
sorting out some of these things would be a good job for someone of
your skills,

Mark


On 22 Apr, David Reiter wrote:
> Hi,
>  I am running into a problem when having cfengine copy over files
> in a directory from a linux box. My setup is the following:
> 
> I have a /var/cfengine/rpms directory on the linux box. I want
> any files that get put in that directory to be copied to the
> windows box. I added the following lines:
>  
> directories:
>  /var/cfengine/rpms
> 
> Then had lines in the copy: section to copy any changed files in
> /var/cfengine/rpms over. 
> 
> What would happen when I tried was I would get log messages
> saying creating directory /var/cfeninge/rpms then error
> messages saying it didn't exist. When I looked in the 
> filesystem (under cygwin) /var/cfengines/rpms was never created.
> So the rpms in the directory never got copied over. After doing
> some debugging I found out that it was actually creating 
> c:\var\cfeninge\rpms, but then trying to copy the rpm files
> to the cygwin /var/cfengine/rpms directory. 
> 
>  I traced the source of this problem to line 486 
>       *spc = FILE_SEPARATOR;
> For Windows FILE_SEPARATOR points to '\\' so as it was
> checking the directories in MakeDirectoriesFor it was
> using '\\' which then went out to the C: drive. I changed
> the logic to save the first separator as it was parsing the
> directory and use it as it created the dirs, which seems 
> to have fixed the problem.
> 
> insert at line 454:
> if (Path_File_Separator == '\0') Path_File_Separator = *sp;
> then change 486 to:
> *spc = Path_File_Separator;
> and declare the variable
> char Path_File_Separator='\0'; at the top of MakeDirectoriesFor()
> 
> Does this fix sound reasonable? Am I going to have problems with 
> other windows paths? Was there are specific reason the directories
> were being changed to \ ? Thanks for any information,
> 
> David.
> 
> 
> 
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-cfengine



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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