* UDEV mount event not generated
@ 2007-08-30 15:38 mariodebian
2007-08-30 16:13 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: mariodebian @ 2007-08-30 15:38 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 2053 bytes --]
Hi all.
I'm developing an embeded thin client system based on initramfs using
debian kernel bins, and libs: www.tcosproject.org
I'm using debian unstable (udev 0.114-2 ).
My thin client remote devices manager (tcos-devices-ng.py [1]) uses udev
events, I load events using a XMLRPC server running on thin client.
1.- I have created one simple udev rule [2]:
SUBSYSTEM=="block", RUN+="/sbin/tcos-udevd.sh"
tcos-udev.sh [2] script is called in every udev block event.
Some time ago (when I start developing this tools) I filter this events
in my python app:
self.udev_events={
"insert": {"ID_BUS": "usb", "ACTION":"add"},
"remove": {"ID_BUS": "usb", "ACTION":"remove"},
"mount-floppy": {"DEVPATH": "/block/fd0", "ACTION":"mount"},
"umount-floppy":{"DEVPATH": "/block/fd0", "ACTION":"umount"},
"mount-cdrom": {"DEVPATH": "/block/hd*", "ACTION":"mount"},
"umount-cdrom": {"DEVPATH": "/block/hd*", "ACTION":"umount"},
"mount-flash": {"DEVPATH": "/block/sd*", "ACTION":"mount"},
"umount-flash": {"DEVPATH": "/block/sd*", "ACTION":"umount"}
}
This is the meaning of every element:
"udev-event-name": {"condition1":"condition1", "cond2":"cond2"}
All actions worked ok:
* add (tell thin client to mount DEVNAME)
* remove (tell thin client to umount all parts in DEVNAME)
* mount (show a message: Device XXX is ready)
* umount (show a message: You can unplug device XXX)
In 2007 June this tools works ok (don't remember udev version) [3]
I don't know when mount/umount stop working, but from some weeks ago I
can see mount/umount messages.
Why udev don't send mount/umount block events to my app?
Any ideas?
Bad rules file?
Thanks for your work
[1]
http://trac.tcosproject.org/browser/trunk/tcosmonitor/tcos-devices-ng.py?rev=444
[2] http://trac.tcosproject.org/browser/trunk/tcosmonitor/udev
[3] http://www.tcosproject.org/tcos-devices-ng/ (screencast)
--
mariodebian
http://soleup.eup.uva.es/mariodebian
[-- Attachment #1.2: Esta parte del mensaje está firmada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: UDEV mount event not generated
2007-08-30 15:38 UDEV mount event not generated mariodebian
@ 2007-08-30 16:13 ` Kay Sievers
2007-08-30 18:41 ` mariodebian
2007-08-30 19:31 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2007-08-30 16:13 UTC (permalink / raw)
To: linux-hotplug
On 8/30/07, mariodebian <mariodebian@gmail.com> wrote:
> I'm developing an embeded thin client system based on initramfs using
> debian kernel bins, and libs: www.tcosproject.org
>
> I'm using debian unstable (udev 0.114-2 ).
>
> My thin client remote devices manager (tcos-devices-ng.py [1]) uses udev
> events, I load events using a XMLRPC server running on thin client.
>
>
> 1.- I have created one simple udev rule [2]:
>
> SUBSYSTEM="block", RUN+="/sbin/tcos-udevd.sh"
>
>
> tcos-udev.sh [2] script is called in every udev block event.
>
>
> Some time ago (when I start developing this tools) I filter this events
> in my python app:
>
> self.udev_events={
> "insert": {"ID_BUS": "usb", "ACTION":"add"},
> "remove": {"ID_BUS": "usb", "ACTION":"remove"},
> "mount-floppy": {"DEVPATH": "/block/fd0", "ACTION":"mount"},
> "umount-floppy":{"DEVPATH": "/block/fd0", "ACTION":"umount"},
> "mount-cdrom": {"DEVPATH": "/block/hd*", "ACTION":"mount"},
> "umount-cdrom": {"DEVPATH": "/block/hd*", "ACTION":"umount"},
> "mount-flash": {"DEVPATH": "/block/sd*", "ACTION":"mount"},
> "umount-flash": {"DEVPATH": "/block/sd*", "ACTION":"umount"}
> }
>
>
> This is the meaning of every element:
>
> "udev-event-name": {"condition1":"condition1", "cond2":"cond2"}
>
> All actions worked ok:
>
> * add (tell thin client to mount DEVNAME)
> * remove (tell thin client to umount all parts in DEVNAME)
> * mount (show a message: Device XXX is ready)
> * umount (show a message: You can unplug device XXX)
>
>
> In 2007 June this tools works ok (don't remember udev version) [3]
>
> I don't know when mount/umount stop working, but from some weeks ago I
> can see mount/umount messages.
>
> Why udev don't send mount/umount block events to my app?
>
> Any ideas?
> Bad rules file?
These events were deprecated, and are removed from the kernel. They
didn't work correctly for all setups. You can poll() the /proc/mounts
file to get notifications about mount tree changes.
Udev will not see any of these events. You may just plug into HAL,
which sends events for all that stuff. Look at "lshal --monitor".
Kay
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: UDEV mount event not generated
2007-08-30 15:38 UDEV mount event not generated mariodebian
2007-08-30 16:13 ` Kay Sievers
@ 2007-08-30 18:41 ` mariodebian
2007-08-30 19:31 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: mariodebian @ 2007-08-30 18:41 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 753 bytes --]
[...]
> These events were deprecated, and are removed from the kernel. They
> didn't work correctly for all setups. You can poll() the /proc/mounts
> file to get notifications about mount tree changes.
>
Thanks for quick answer!!!
From which kernel version are removed? Where can i search for this?
I'm started a simple C app to poll() /proc/mounts and returns udev
mount/umount events
> Udev will not see any of these events. You may just plug into HAL,
> which sends events for all that stuff. Look at "lshal --monitor".
>
Hal is not an option because thin client have only the essential
software: kernel + udev + Xorg + other minor utils
Many thanks for your help
> Kay
--
http://soleup.eup.uva.es/mariodebian
[-- Attachment #1.2: Esta parte del mensaje está firmada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: UDEV mount event not generated
2007-08-30 15:38 UDEV mount event not generated mariodebian
2007-08-30 16:13 ` Kay Sievers
2007-08-30 18:41 ` mariodebian
@ 2007-08-30 19:31 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2007-08-30 19:31 UTC (permalink / raw)
To: linux-hotplug
On 8/30/07, mariodebian <mariodebian@gmail.com> wrote:
> [...]
>
> > These events were deprecated, and are removed from the kernel. They
> > didn't work correctly for all setups. You can poll() the /proc/mounts
> > file to get notifications about mount tree changes.
> >
>
> Thanks for quick answer!!!
>
> From which kernel version are removed? Where can i search for this?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h106d46f51a1a72fdbf071ebc0800a9bcfcbc544
Kay
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-30 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-30 15:38 UDEV mount event not generated mariodebian
2007-08-30 16:13 ` Kay Sievers
2007-08-30 18:41 ` mariodebian
2007-08-30 19:31 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).