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

Maciej (Matchek) Blizinski maciej at opencsw.org
Tue Jun 1 17:40:37 CEST 2010


No dia 1 de Junho de 2010 16:25, Philip Brown <phil at bolthole.com> escreveu:
> 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.

I think I know what you think it is, and it's not that. ;-)

You need to think about what happens in the case of the "none" class,
and then extrapolate it to our CAS.


More information about the maintainers mailing list