[csw-maintainers] cswclassutils: location of template init scripts

Philip Brown phil at bolthole.com
Tue Jun 1 17:25:04 CEST 2010


On Tue, Jun 1, 2010 at 8:06 AM, Maciej (Matchek) Blizinski
<maciej at opencsw.org> wrote:

>> err... that's not what it's supposed to do. the script is supposed to
>> copy it FROM there to whereever it needs
>
> Not sure what you mean.  Right now, in the code[1] there is:
>
> while read src dest
> do
>  (...)
>  /usr/bin/cp $src $dest || exit 2
>  (...)
> done


Ah. forgot about that.

There are two aspects to class action scripts, speaking generally.

1. optional "special processing" done on the file.

2. mandatory "hey, install this" stuff, that every class action script
has to do.

I was thinking of the #1 part. Whereas you were rightly pointing out a
bug in #2.

What we SHOULD be doing, is something like.

if test -f $dest ; then
   if cmp $src $dest ; then
      echo $dest already exists - continuing
   else
      echo ERROR: $dest exists and is not correct file
      exit 1 #?
   fi
else
  cp $src $dest
fi

# and then later, do the "copy FROM $dest, to appropriate place(s)" as
we presumably
# do already.


More information about the maintainers mailing list