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

Stefan Pendl stefan.pendl.71 at gmail.com
Fri Oct 3 22:24:29 CEST 2014


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?




More information about the wpkg-users mailing list