[wpkg-users] [wpkg-announce] WPKG 1.1.1-M3, lots of new features

Tomasz Chmielewski mangoo at wpkg.org
Mon Apr 7 14:41:52 CEST 2008


Rainer Meier schrieb:

[I'm moving the discussion to wpkg-users list]

> After some sleepless nights and even some days I can proudly announce 

My spam filter catches loads of mails which advertise pills - should I
forward some of them to you for your sleeplessness problems? ;)


> NEW: Added new check type: "execute". This allows you to execute any script
>      which checks if an application is installed - based on the exit code of
>      the script.
>      Usage:
>      type="execute" path="\\path\to\script.cmd"
>          condition="exitcodesmallerthan" value="0"
>              Evaluates true if the exit code is negative

This is very nice.

I wonder how could it help in a situation described below (or, perhaps, 
a "reversed" type of such check; "conditional profile").

A classroom of workstations - logically, they should go into one profile.

Workstations are different hardware models.

WPKG could be used to deploy drivers on these machines - but some driver 
installers will just bail out and go to interactive, GUI mode if they 
are being installed on different hardware (a.k.a "No compatible hardware 
found, click OK to exit silent mode").

How do we get around this problem? Creating additional profiles is a 
no-go - hosts have either similar IP addresses or hostnames.


To get an idea, see http://wpkg.org/HP_drivers - it shows silent 
installers for a HP nx6325 laptop drivers. There are several of these 
drivers, and they should only be installed on nx6325 laptops.


I put a compiled dmidecode.exe binary on http://wpkg.org/Download - it 
can output such data which helps us identify hardware:

prompt> dmidecode.exe --string system-product-name
HP Compaq nx6325 (EY345ET#ABD)


Of course, it can be wrapped in a script which would exit with a 
specified exit code.


So, let's say we have a profile which packages _potentially_ have to be 
started on all hosts in our networks:

     <profile id="laptop_model_A">
        <package package-id="A_graphics" />
        <package package-id="A_audio" />
        <package package-id="A_cardreader" />
        <package package-id="A_wireless" />
     </profile>


What would be needed is something like this in hosts.xml:

  <host name=".+" profile-id="default">
   <type="execute" path='\\path\to\script.bat'
          condition="exitcodeequalto" value='0'
          depends_profile="laptop_model_A" />
  </host>


\\path\to\script.bat would be started on each wpkg.js start - if exit 
code matches, a given profile would be applied to that host.


Does it sound sane?

Right now, some ugly scripting seems to be needed, which doesn't really 
give benefits of WPKG.



-- 
Tomasz Chmielewski




More information about the wpkg-users mailing list