I need to run a local program (rmbox) against an account before it gets
deleted from eDirectory. I can build the command line, and the java exec
call seems to be working because I see the log file (rmbox.log) get
created, but the results are not what I'm expecting.

rmbox is reporting that it can't find the user object. If I run the same
command line from bash myself, it works fine.

I'm suspecting that the java exec() call is not blocking policy
execution, so that while the jvm is busy setting up and running rmbox,
the IDM engine is carrying forward and deleting the object before rmbox
can get there.

Is there a way to specify that I want IDM to wait for the java exec to
complete and return?

Code:

<rule>
<description>Delete mailbox prior to deleting User object</description>
<comment xml:space="preserve">Before it is safe to delete the eDirectory
User Object, the associated Netmail mailbox must be removed using /rmbox/
to safely clean up the message store.</comment>
<conditions>
<and>
<if-operation mode="case" op="equal">delete</if-operation>
</and>
</conditions>
<actions>
<do-set-local-variable name="runtime-instance">
<arg-object>
<token-xpath expression="runtime:getRuntime()"/>
</arg-object>
</do-set-local-variable>
<do-set-local-variable name="cmd-line" scope="policy">
<arg-string>
<token-text xml:space="preserve" xmlns:xml="http://www.w3.org/
XML/1998/namespace">/opt/novell/netmail/bin/rmbox -u:admin -p:secret </
token-text>
<token-src-name/>
<token-text xml:space="preserve"> -d </token-text>
<token-text xml:space="preserve" xmlns:xml="http://www.w3.org/
XML/1998/namespace"> -l:/var/log/rmbox.log</token-text>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="process">
<arg-object>
<token-xpath expression="runtime:exec($runtime-instance, $cmd-line)"/>
</arg-object>
</do-set-local-variable>
</actions>
</rule>

No trace - it doesn't show anything especially interesting anyway.


--
---------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Novell Support Forums Volunteer SysOp http://forums.novell.com

Please post questions in the newsgroups. No support provided via email.