Re: [systemd-devel] udev event on usb unpluged

2015-08-31 Thread christophe . jalady
>I do not think you can get a useful event from udev for filesystem unmounting. ok fine. >But you should be able to get events for device removal Could someone provide the simplest .rule to catch such event ?? Christophe - Mail original - De: "Tom Yan" À: "c

Re: [systemd-devel] udev event on usb unpluged

2015-08-31 Thread christophe . jalady
>By the way, Milasan asked you to use -u and -p for udevadm monitor. See attached the logs with -u and -p parameters (seem's that it's less than without). Christophe - Mail original - De: "Tom Yan" À: "christophe jalady" Cc: "Robert Milasan"

Re: [systemd-devel] udev event on usb unpluged

2015-08-29 Thread christophe . jalady
to my first question: Is it possible to get an event from udev (or whatever) alerting that: either the g_mass_storage is unmounted by the other host _or_ that an usb cable is unplugged. I'll check for the rest of your answer. (thanks by the way!) Christophe - Mail original -

Re: [systemd-devel] udev event on usb unpluged

2015-08-29 Thread christophe . jalady
v.log ?? 2) Why is there no "usb" event in udev.log (nor add/change or remove ...) ? For completeness, I attach also my .rule and .sh scripts. Thanks for your help. Christophe - Mail original - De: "Robert Milasan" À: "christophe jalady" Cc: systemd-deve

Re: [systemd-devel] udev event on usb unpluged

2015-08-26 Thread christophe . jalady
>They are not referring to your device, but the machine on which you are running the rule. >In a terminal/console you run: udevadm monitor >The do the removal itself and see what 'udevadm monitor' says. this is the problem: the machine which are running the rule is a "specific robotic device" wit

Re: [systemd-devel] udev event on usb unpluged

2015-08-26 Thread christophe . jalady
rocess directly from my device. Does the scripts provided are enough to help you understanding my problem ? Christophe - Mail original - De: "Tom Yan" À: "christophe jalady" Cc: "systemd" Envoyé: Mercredi 26 Août 2015 08:57:12 Objet: Re: [systemd-devel] u

Re: [systemd-devel] udev event on usb unpluged

2015-08-26 Thread christophe . jalady
o with mass-storage usb-key. So: On usb-plugged: I load the module k_mass_storage: the other device see a new mass-storage device appearing, copy files and then umount/unplugged the cable. When the cable is unplugged, I want to trigger an action on my device (processing the files copied). Christo

[systemd-devel] udev event on usb unpluged

2015-08-25 Thread christophe . jalady
Hi, I would like to receive an event (actually run a script) when I plug/unplugged an usb cable. I tried to use udev with this simple rule: SUBSYSTEM=="usb",RUN+="/var/local/usb-changed.sh" I do receive the "add" event when I plug the usb cable: just perfect ! But I never receive the "remove" e