[csw-maintainers] GAR: Preprocessing a postinstall file

Dagobert Michelsen dam at opencsw.org
Thu Sep 16 21:23:30 CEST 2010


Hi Maciej,

Am 16.09.2010 um 18:17 schrieb Maciej (Matchek) Blizinski:
> No dia 16 de Setembro de 2010 11:35, Maciej (Matchek) Blizinski
> <maciej at opencsw.org> escreveu:
>> No dia 12 de Dezembro de 2009 07:05, Dagobert Michelsen
>> <dam at opencsw.org> escreveu:
>>> Hi Maciej,
>>>
>>> Am 12.12.2009 um 02:27 schrieb Maciej (Matchek) Blizinski:
>>>>
>>>> Suppose I have a file CSWfoo.postinstall, which has some variables
>>>> which need to be substituted before the file can be shipped.
>>>> Something along the lines of:
>>>>
>>>> mycommand=@bindir@/foo
>
> Dago, you asked why do I need to preprocess the file.  Here's an  
> example:
>
> # Read in the user configuration file
> [ -s /opt/csw/etc/postgresql.conf ] && . /opt/csw/etc/postgresql.conf
> [ -s @sysconfdir@/postgresql.conf ] && . @sysconfdir@/postgresql.conf
>
> # Defaults
> [ -z "${PGDATA}" ] && PGDATA=@PGDATA@
> [ -z "${PGCTL}" ] && PGCTL=@bindir@/sparcv8/pg_ctl
> [ -z "${PGINIT}" ] && PGINIT=@bindir@/sparcv8/initdb
>
> I would like the script source to be identical for PostgreSQL 8.3 and
> 8.4 (and potentially 9.0).  Of course, I could just hardcode the
> values.  However, the bigger plan is to rework both 8.3 and 8.4
> packages so that you can run both at the same time and migrate the
> data with minimal downtime.

Ok, done in r10981:
   http://sourceforge.net/apps/trac/gar/changeset/10981

Let me know if you encounter anything strange.


Best regards

   -- Dago



More information about the maintainers mailing list