[wpkg-users] setting variables depending on hostnames

Peter Beck peter at datentraeger.li
Thu Dec 1 00:10:05 CET 2011


On 11/29/2011 09:43 PM, Stefan Pendl wrote:
> Am 29.11.2011 05:27, schrieb Chris Mortimer:
>> Hello Peter,
>>
>> Personally, I would have a central text file (on the wpkg server) that
>> contains lines like:
>>
>> Hostname:serial number
>>
>> I'd then write a script that would be run before the Acrobat install
>> line in your xml file. This script would read through the central text
>> file, looking for the provided hostname - first argument to the
>> script, and return the serial number.
 >> [...]

Hi Chris,

this sounds like a solution, thank you very much. But somehow I'd like 
to use wpkg internal commands like the ones from Stefan below. Since we 
have the new release candidate it's seems to be very easy doing this 
inside the wpkg configs without external scripts. But it is a solution 
and good to know.

> It is not needed to complicate things by introducing an additional
> parser, since this can be done already with the latest WPKG release
> candidate available at
> http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/stable/src/main/resources/wpkg/

Hi Stefan,

I am already enjoying the most current versions and the great features 
we can use now - fantastic development here!

> You can do something along the following lines:
>
> '---code start (watch for line wraps)
>
> <profile id="AcrobatSerials">
> <variable name="ACROBAT_SERIAL" value="..." hostname="office1"/>
> <variable name="ACROBAT_SERIAL" value="..." hostname="office2"/>
> <variable name="ACROBAT_SERIAL" value="..." hostname="office3"/>
> <variable name="ACROBAT_SERIAL" value="..." hostname="office4"/>
> ...
> </profile>
>
> '---code end

I think this is *exactly* what I am searching for - I can set the 
serials in the customer-profile I am already using for other serials, 
but I did not know how to match variables to a specific host.

Thank you very much for this hint - you made my day :-)

Best Regards
Peter




More information about the wpkg-users mailing list