Extending fcopy

Achim Bohnet ach at mpe.mpg.de
Fri Dec 8 11:29:46 CET 2006


On Thursday, 7. December 2006 22:45, Michael Tautschnig wrote:
> Hi all,
> 
> Janning has proposed quite a few enhancements to fcopy lately. I think the
> resulting discussion should be bundled in a single thread and it should actually
> move to linux-fai-devel (@Janning: don't know, whether you are subscribed to
> this one already).
> 
> Just to summarize, the suggestions were:
> 
> - some -k/--keep option (which I'd rather call --keep-permissions :-) ) to
>   retain the permissions of the file which should be overwritten (BTW: what
>   should happen if there is no such file?)

I'm not against the option, but in the an FAI context, IMHO one should now
user:group:permission before overriding a file.  If there are different
from host to host, then either it's wrong or I better 'code' this exception
in the installation scripts.  <- IMHO of course.
> 
> - some way to return the number of files that were actually copied.

That does not sound unix'ish IMHO.  Why not the
paths of the files copied are listed on stdout.  Num is then just adding
'| wc -l'.   And stuff like: fcopy --whatever | while read file; do ...
are still possible.

Philosophical: I favour postinst scripts for all this, i.e. event based
programming ;)   When using FAI the first time the split of data below
files and scripts using then scattered over the rest of fai/config
was very hard to follow.  Now I use fcopy recursive once and logic is
in postinst files.  And if something is missing I would first think
about adding another event script like postinst and filemode.

> My objections were
> - Adding code to a mission-critical tool like fcopy is dangerous.
> - More options may confuse users.
> - The intended behaviour may be simulated using pre-/postinst scripts.
> 
> 
> In my opinion the first and the second are still valid, however, the third has
> been proven to be _really_ clumsy. So I guess these options should be added, if
> a proper patch can be provided.

Maybe, but I like the idea of object (config file) and methods (scripts) being at
the same place and not scattered throughout the fai/config tree somewhere (hidden)
in scripts.  In my (limited) experience it's easier to figure out _later_ when-why-what
happens with the config file.

Just my 2 euro cent,
Achim
> 
> Hoping for further discussion,
> Michael
> 
> 
> 

-- 
  To me vi is Zen.  To use vi is to practice zen. Every command is
  a koan. Profound to the user, unintelligible to the uninitiated.
  You discover truth everytime you use it.
                                      -- reddy at lion.austin.ibm.com



More information about the linux-fai-devel mailing list