All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Executing user script
Date: Tue, 27 Mar 2001 05:19:50 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-98567080321086@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-98564705605342@msgid-missing>

On Mon, Mar 26, 2001 at 05:56:55PM -0500, Michael Wright wrote:
> 
> I have a script that I want to call everytime that hotplug gets
> activated. (i.e. I want to notify my application everytime a USB device
> is added or removed) Is there a way to do this without hard coding
> my script name in one of the hotplug scripts?

A different way might be to look at usbdevfs.  For usbview, I stat
/proc/bus/usb/devices and if that changes, then I know a device was
added or removed.  Then you can go and scan the tree to see what
happened.

devfs can also notify your program when a device is seen or removed.

As for your original question, I don't think there is a way to add a
user helper, but not quite sure.  Need to look at the scripts some
more...

Hope this helps,

greg k-h

-- 
greg@(kroah|wirex).com

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2001-03-27  5:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-26 22:56 Executing user script Michael Wright
2001-03-27  5:19 ` Greg KH [this message]
2001-03-27 15:58 ` David Brownell
2001-03-27 18:08 ` Michael Wright
2001-03-27 18:41 ` David Brownell
2001-03-27 18:58 ` Gioele Barabucci

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=marc-linux-hotplug-98567080321086@msgid-missing \
    --to=greg@kroah.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.