linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* config questions
@ 2002-08-26  5:50 Ian Walters
  2002-08-27 14:53 ` David Brownell
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Walters @ 2002-08-26  5:50 UTC (permalink / raw)
  To: linux-hotplug

Hi,

Sorry if this sounds like a newbie question, but the search on the archives 
kind of suck.

I just finished (successfully after much pain) get hotplug to initialize a 
device for me when it was plugged in.  But to do this I had to bypass all of 
the existing net.agent script.

I am guessing I didn't find the right documentation.  I will tell you what I 
did and hopefully someone can tell me what I should have done.

Have usbnet loaded as a module.

in /etc/hotplug/net.agent  before anything, do 


mesg Checking for subscript for $INTERFACE $ACTION
if [ -x "/etc/hotplug/interfaces/$INTERFACE" ] ; then
    mesg Calling subscript for $INTERFACE $ACTION
    /etc/hotplug/interfaces/$INTERFACE $ACTION
    exit 0
fi

and in /etc/hotplug/interfaces reacted to the arguments registered and 
derigistered to do what I needed for /dev/usb0

Ideally I would always like to say... for devX put file into interfaces/devX 
and in that file do X for plugged in and Y for unplugged.  Just like the 
init.d scripts.

Information on why my approach is wrong would help, the page 
http://linux-hotplug.sourceforge.net/
talked a lot about what hotplug without ever getting to the one question most 
people would have...
"I have new device X and I want Y to happen when I plug it in.  What do I do?"

Thanks for any information.  If it turns out this description isn't in 
existence yet (for users who just want an answer to the above question, not 
understand how hotplug works) then I might do one up.

Ian.


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-08-28  5:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-26  5:50 config questions Ian Walters
2002-08-27 14:53 ` David Brownell
2002-08-27 23:50 ` Ian Walters
2002-08-28  4:13 ` Ajay
2002-08-28  5:21 ` Greg KH

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).