From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Iragne Date: Mon, 29 Mar 2004 16:21:00 +0000 Subject: Re: add/remove actions for usb devices Message-Id: <40684CEC.7060304@labri.fr> List-Id: References: <40648838.2040703@labri.fr> In-Reply-To: <40648838.2040703@labri.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Kay Sievers wrote: >/etc/dev.d/sda1/name.dev should work. > > >This is what actual happens for /dev/hda: > > Mar 28 19:44:37 pim udev[9323]: dev_d_send: DEVNAME='/udev/hda' > Mar 28 19:44:37 pim udev[9323]: call_foreach_file: open directory '/etc/dev.d/hda' > Mar 28 19:44:37 pim udev[9323]: call_foreach_file: unable to open '/etc/dev.d/hda' > Mar 28 19:44:37 pim udev[9323]: call_foreach_file: open directory '/etc/dev.d/block' > Mar 28 19:44:37 pim udev[9323]: call_foreach_file: unable to open '/etc/dev.d/block' > Mar 28 19:44:37 pim udev[9323]: call_foreach_file: open directory '/etc/dev.d/default' > Mar 28 19:44:37 pim udev[9323]: call_foreach_file: put file '/etc/dev.d/default/1.dev' in list > >Kay > > ok, back again!! with your help, i've almost reached my goals. now, i catch add/remove events specifically for the devices i want. BUT (yes there is a problem, it would have been too easy), i have a problem on device removal. here is the udev.rules line : BUS="usb", SYSFS{serial}="0A3703002602", KERNEL="sd?1", PROGRAM="/etc/udev/scsi-devfs.sh %k %b %n", NAME="xdrive" now, i've created a xdrive directory in /etc/dev.d and in this xdrive directory, i've put a script like this one : echo $ACTION >> /var/log/hotplug case "$ACTION" in add) mount /dev/xdrive /home/florian/xdrive -osync,umask0 ;; remove) umount /home/florian/xdrive ;; esac exit 0 on device add, it is correctly mounted. on device removal, the system freeze and i have to use magic keys to reboot the machine. I've enabled kernel verbose debug messgaes and other stuffs like this, but can't get any error message. does anyboddy have an idea to solve this problem? (unfortunately, i can't install udev from sources currently, so i can't activate its debug mode, or maybe it's possible through a configuration file?) thanks for helping Florian ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ 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