fcopy feature request: report if a file was copied

Janning Vygen vygen at planwerk6.de
Wed Dec 6 17:13:21 CET 2006


Am Mittwoch, 6. Dezember 2006 17:01 schrieben Sie:
> > Am Mittwoch, 6. Dezember 2006 16:13 schrieb Michael Tautschnig:
> > > > hi,
> > > >
> > > > as i use softupdate a lot , it would be nice to have a fcopy feature
> > > > which reports if any files or file permissions were changed. Look at
> > > > my script in BASE/50-ntp
> > >
> > > [...]
> > >
> > > I guess postinst is what you really want (and it is already there,
> > > after all). See the man page.
> >
> > you are right, but
> >
> > - postinst is called for every file which is copied
> > -
>
> Which is what you intended, as I understood it - this does _not_ mean that
> postinst is called for every file that fcopy is run on, but only in those
> cases where the file is _really_ copied, i.e., overwritten.

yes but imagine 
    fcopy -ir /etc/postfix/
and i need a postinst script with 
   /etc/init.d/postfix reload

i have to place postinst inside
  /etc/postfix/main.cf/BASE/postinst
  /etc/postfix/master.cf/BASE/postinst
right?

and if i did change master.conf and main.conf postinst would be called two 
times. and what if i have 30 files or more in /etc/postfix like virtual 
tables ...

with my approach it would be

    `fcopy -irR /etc/postfix/` -gt "0" && /etc/init.d/postfix reload

(maybe this is not correct bash syntax, just example code )

kind regards
Janning



More information about the linux-fai mailing list