Hi,

Christian Boltz wrote:
> 
> Am Freitag, 29. September 2006 21:59 schrieb Carl-Daniel Hailfinger:
> [...]
>>     <ivm:Match name="hal.block.device" value="/dev/hdc">
>>         <ivm:Condition name="EjectPressed"
>>         exec="/usr/bin/halmount -u'$hal.block.device$'" /> 
>>         <ivm:Condition name="EjectPressed"
>>         exec="/usr/bin/eject '$hal.block.device$'" />
>>     </ivm:Match>  
>>
>> You now have to press eject twice (because there is no way to
>> tell ivman to wait for return of the previous command), [...]
> 
> Two ideas to avoid that you have to press the button twice, both 
> untested ;-)
> 
> a) (would be the best solution)
> 
>     <ivm:Match name="hal.block.device" value="/dev/hdc">
>         <ivm:Condition name="EjectPressed" exec="/usr/bin/halmount -u 
>         '$hal.block.device$' ; /usr/bin/eject '$hal.block.device$'" />
>     </ivm:Match>

Unfortunately that didn't work. I already tried it before writing my
previous mail. Basically, only the first command is executed.

> b) (if a) doesn't work)
> 
>    put the two commands in a small script:
>       /usr/bin/halmount -u "$1"
>       /usr/bin/eject "$1"
>    and let ivman execute this script.

Unfortunately, that doesn't work either because halmount terminates
before the umount is complete and so eject only works in the second
iteration.

Sending the eject command via dbus could work if ordering is honored,
but I have no working code for that.

Regards,
Carl-Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to