[wpkg-users] Extend package definition for one host only

Marco Schmidt schmidt at fgcz.ethz.ch
Fri Oct 3 23:09:29 CEST 2014


Yes, this is one way.

I would do it in a more "readable" way :-)

<variable name="PKG_DESTINATION" value="destination_x86" 
architecture="x86" />
<variable name="PKG_DESTINATION" value="destination_x64" 
architecture="x64" />
<install cmd='%ComSpec% /c echo AutoUpdateDisable=1 
>"%PKG_DESTINATION%\mms.cfg"'>

And the host condition I would pack in the the hosts.xml file.

Which I think is easier to maintain.

But yours is also okay, but I would not do it this way.
On my site, there are several persons updating the configuration, 
therefore it has to be as easy and modular as possible.
Not all of my co-workers are able to understand complex logical 
expressions :-)

Greetings ...
  Marco


Am 03.10.2014 um 22:24 schrieb Stefan Pendl:
> Am 03.10.2014 21:08, schrieb Marco Schmidt:
>> You can do it like this:
>>
>> <install cmd="your special command" hostname="NAMEOFCOMPUTER" />
>>
>> Not tested, but that is what is written in den docu.
>>
>> http://wpkg.org/Extended_host_attribute_matching
>>
>> According to the docu, you could even use regular expressions for
>> matching the hostname.
>
> The example will work for a simple check, but if you need more complex
> checks, like excluding hosts, you would use the condition tag as shown
> below.
>
> This is disabling auto updates for all hosts except the ones of the IT,
> so that the IT gets notified of updates.
>
> '---code start (watch for line wraps)
>
>          <install cmd='%ComSpec% /c echo AutoUpdateDisable=1
> >"%PKG_DESTINATION%\mms.cfg"'>
>              <condition>
>                  <check type="logical" condition="not">
>                      <check type="host" condition="hostname"
> value="^(CA[DM]\-A|EDV)" />
>                  </check>
>              </condition>
>          </install>
>          <install cmd='%ComSpec% /c echo AutoUpdateDisable=1
> >"%PKG_DESTINATION_X64%\mms.cfg"'>
>              <condition>
>                  <check type="host" condition="architecture" value="x64" />
>                  <check type="logical" condition="not">
>                      <check type="host" condition="hostname"
> value="^(CA[DM]\-A|EDV)" />
>                  </check>
>              </condition>
>          </install>
>
> '---code end
>
> --
> Stefan P.
>
> Top-posting:
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> -------------------------------------------------------------------------
> SSLrack - get your cheap cheap SSL certificates (standard, wildcard, EV)
> http://www.sslrack.com/
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list