From mboxrd@z Thu Jan 1 00:00:00 1970 From: jjluza Date: Sun, 28 Mar 2004 16:16:22 +0000 Subject: Re: add/remove actions for usb devices Message-Id: <200403281816.22025.jjluza@yahoo.fr> List-Id: References: <40648838.2040703@labri.fr> In-Reply-To: <40648838.2040703@labri.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Le dimanche 28 Mars 2004 16:58, vous avez =E9crit : > > The script is called for every device node udev has created. > You get one event for the main device and one for the partition. > I expect, that you need to look at DEVPATH to catch the > "partition call" only. > > Kay Ok, it works with this script (with the same name and in the same place) : > #!/bin/bash >=20 > case $DEVPATH in > /block/sd?/sd?1) >=20 > case $ACTION in > add) > mount -t vfat -o sync /dev/usbst1 /mnt/usbst > ;; > remove) > umount /mnt/usbst > ;; > esac > esac Thanks for your tip. Now, I have still a problem, I just notice (as it is said in the manpage of= =20 mount) that I can't use "-o sync" with "-t vfat". I get no error, but the=20 behaviour is like it is not mounted with sync option (I even got a awfull=20 kernel oops). Is there a workaround since usb stick need to use vfat and only vfat fs ? I= =20 would like to stop using supermount with my usb stick, if it's possible.=20 Sorry if it's not udev related, maybe you know someone I can ask about that= ? ------------------------------------------------------- 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_id=1470&alloc_id638&op=CCk _______________________________________________ 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