[wpkg-users] Execute check and pipes

Daniel Dehennin daniel.dehennin at ac-caen.fr
Thu Jun 5 13:20:58 CEST 2008


Hello,

I'm using the following configuration to add a run of wpkgservice at
12:30 every day of the weekd:

==== wpkg-at ====
<?xml version='1.0' encoding='utf-8'?>
<packages>
  <package
      id='wpkg-at'
      name='Run WPKG at a time'
      revision='1'
      reboot='false'
      priority='100'>

    <variable name='ATTIME' value='12:30 /every:l,ma,me,j,v'/>
    <variable name='ATCMD' value='sc start wpkgservice'/>

    <check type='execute' path='at | %WPKGBIN%\grep "%ATCMD%"'/>

    <install cmd='at %ATTIME% %ATCMD%'/>

    <remove cmd='at | gawk "/%ATCMD%/ { system(\"at \" $1 \" /delete\") }"'/>

  </package>
</packages>
==== END ====


In the log I got:
Execute check for program 'at \| %WPKG%\bin\grep "sc start wpkgservice"' returned '1'. Evaluating condition 'null' revealed false when comparing to expected value of '0'

Does it fail because of the "\|" ?

I don't know if the "\" is only for the log output or if WPKG try to
run the command as it's shown.

Regards.
-- 
Daniel Dehennin
RAIP de l'Orne



More information about the wpkg-users mailing list