From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 17 Nov 2005 21:09:07 +0000 Subject: Re: hot-plugged USB Harddisk executes backup script in /etc/hotplug/usb twice Message-Id: <20051117210907.GA26670@vrfy.org> List-Id: References: <437CBC28.3040008@anagramm.de> In-Reply-To: <437CBC28.3040008@anagramm.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Nov 17, 2005 at 06:21:44PM +0100, Clemens Koller wrote: > I want to start a backup script in /etc/hotplug/usb whenever I connect > an external USB harddisk (Maxtor OneTouch 300GB) to our fileserver to > make weekly rotating backups. > > Kernel: 2.6.14 (not .2 yet) > Platform: i686 > System: udev-075 > > Whenever I plug (turn on) the external harddisk, udevmonitor shows me > nice events and my script is called. But it's called TWICE at the same > time which leads to mount conflicts and other strange things. > If I call my backup script manually, it works fine. > > The whole system was working on our "old" fileserver running 2.6.11.5 > without udev. The configuration was adopted from the old system, by > copying the script called anabackup to /etc/hotplug/usb > and adding: There was no change regarding this, you always get multiple events for different parts of that device and need to act only on one of them. You can probably look if $INTERFACE, or something else, only for one of the events is set in the environment, else just exit. "udevmonitor --env" should show the difference. Anyway, you better move to udev rules to hook into the events, instead of depending on the weird map stuff, which is not longer supported. Kay ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&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