From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Thu, 30 Aug 2007 16:13:05 +0000 Subject: Re: UDEV mount event not generated Message-Id: <3ae72650708300913l10c0de5gde77fd6fb20ae970@mail.gmail.com> List-Id: References: <1188488304.6133.67.camel@mariodebian> In-Reply-To: <1188488304.6133.67.camel@mariodebian> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 8/30/07, mariodebian 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