linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: hot-plugged USB Harddisk executes backup script in /etc/hotplug/usb twice
Date: Thu, 17 Nov 2005 21:09:07 +0000	[thread overview]
Message-ID: <20051117210907.GA26670@vrfy.org> (raw)
In-Reply-To: <437CBC28.3040008@anagramm.de>

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_id\x16845&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

  reply	other threads:[~2005-11-17 21:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 17:21 hot-plugged USB Harddisk executes backup script in /etc/hotplug/usb Clemens Koller
2005-11-17 21:09 ` Kay Sievers [this message]
2005-11-18 16:00 ` Clemens Koller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051117210907.GA26670@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).