From: Gioele Barabucci <dev@gioelebarabucci.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Executing user script
Date: Tue, 27 Mar 2001 18:58:01 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-98572142500640@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-98564705605342@msgid-missing>
On Tuesday 27 March 2001 00:56, 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?
>
It does not seem difficult...
1st we can create a /etc/hotplug/usb.ext_scripts (containing the names of
programs we have to call) an then execute it line by line from usb.agent.
We can also use something like this
$SCRIPT plugged
$SCRIPT nodriver
$SCRIPT unplugged
$SCRIPT ok
so $1 in your script is the exit status of the various operation done by
hotplug script.
Btw I think the devfs approach is better...
--
Gioele Barabucci (Gb])
) mailto:dev@gioelebarabucci.com
) http://www.gioelebarabucci.com
) ) I've been and now I've gone
) ) /Magic Pie^Oasis
_______________________________________________
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
prev parent reply other threads:[~2001-03-27 18:58 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
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 [this message]
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-98572142500640@msgid-missing \
--to=dev@gioelebarabucci.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 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).