halevt does not pass mount-point to my script during OnInit
I am running halevt to support removable media for a custom system. I have an OnInit rule as follows: (OnInit means the device was already inserted before halevt was started)
<halevt:Device match="&MOUNTABLE; & (!hal.volume.is_disc | hal.volume.is_disc=false)"> <halevt:OnInit exec='halevt-mount -u $hal.udi - m 002 ; usr/sbin/myProgram Add_Init USB "$hal.udi$ "$hal.volume.mount_point$'/> </halevt:Device> myProgram is called but the $hal.volume.mount_point$ is null. When I check in /media the device is mounted there. So why was I passed null for the mount point, is there some kind of race condition. I have a similar rule for the case where a device is inserted after halevt is already started, and it works fine. That rule is for the case where a device gets a mount point, but in the case where halevt is started after a device is inserted, even that rule is not called. Any ideas? |
Try to separate the two actions, because I think halevt will be called another times when the device gets mounted :
Code:
<halevt:Device match="&MOUNTABLE; & hal.volume.is_disc=false"> Also I don't know if you call your program with "usr/sbin" or "/usr/sbin"; and are you sure of the double quotes in : myProgram Add_Init USB "$hal.udi$ "$hal.volume.mount_point$ ? I just realized you missed a $ in your exec line and the ; doesn't seem correct too : <halevt:OnInit exec='halevt-mount -u $hal.udi - m 002 ; ... instead of <halevt:OnInit exec='halevt-mount -u $hal.udi$ - m 002 && ... Maybe it is enough to make your command to work. |
All times are GMT -5. The time now is 01:24 PM. |