[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Two identical usb networking cards problem



On Sat, Mar 03, 2007 at 05:27:04PM +0100, David Fokkema wrote:
> On Sat, 2007-03-03 at 16:13 +0000, Wackojacko wrote:
> > David Fokkema wrote:
> > > On Sat, 2007-03-03 at 15:37 +0000, Wackojacko wrote:
> > >> David Fokkema wrote:
> > >>
> > >>> Still leaves me with one question: how do I figure out which
> > >>> daemon/script brings up my interfaces at what time?
> > >>>
> > >>> Thanks,
> > >>>
> > >>> David
> > >>>
> > >>>
> > >> /etc/init.d/networking is the script.  The order of the scripts is 
> > >> controlled by the order in which they appear in the relevant run level 
> > >> directory /etc/rc(runlevel).d.
> > >>
> > >> The SXXscript 'starts' the script KXXscript stops it.  These links are 
> > >> run in numerical order of the XX.
> > > 
> > > This script only runs 'ifup -a', as far as I can tell. Ifup won't log
> > > which devices it upped. Furthermore, 'ifup -a' never ups my usb nets
> > > eth1 and eth2 when I ssh in, down eth1 and eth2 and then issue 'ifup
> > > -a'. However, one of them is always up when my system finishes booting.
> > > How can that be?
> > > 
> > >
> > Hmm!
> > 
> > from man ifup
> > 
> > '-a, --all      If given to ifup, affect all interfaces marked auto.  	 
> > Interfaces are brought up in the order in which they are  defined in 
> >        /etc/network/interfaces.'
> > 
> > man interfaces
> > 
> > 'Lines beginning with the word "auto" are used to identify the physical 
> > interfaces to be brought up when ifup is run  with  the  -a option. 
> > (This  option  is  used by the system boot scripts.)  Physical interface 
> > names should follow the word "auto" on the same line.  There can be 
> > multiple "auto" stanzas.  ifup brings the named interfaces up in the 
> > order listed.
> > 
> > Lines beginning with "allow-" are used to identify interfaces that 
> > should be brought up automatically by various  subsytems.  This may  be 
> > done using a command such as "ifup --allow=hotplug eth0 eth1", which 
> > will only bring up eth0 or eth1 if it is listed in an "allow-hotplug" 
> > line. Note that "allow-auto" and "auto" are synonyms.'
> > 
> > So ifup -a will only bring up all the interfaces marked 'auto' as you 
> > have discovered.
> > 
> > allow-hotplug passes the task of bringing up of the interface to udev 
> > (as this now incorporates hotplug) so /etc/init.d/udev is the script 
> > that starts the deamon.
> > 
> > As to why this doesn't work and the 'auto' does, its probably something 
> > to do with the udev rules used to identify the interfaces.  I don't have 
> > usb interfaces and am not a udev expert so I don't know how much more 
> > help I can be :)
> 
> I have the same feeling. Reading through the documentation I believe I
> get a feeling for how it works, but looking through the logs (there
> _are_ udev logs and I modified net.agent to log the interface it is
> operating on) no devices are brought up by udev (unless I yank it out
> and insert it again in my usb hub). So... what happens? It is irritating
> to discover that linux does not log everything (as I always tell windows
> users who're tracking down fathomable problems).
> 
I have a vague impression that this may be related to the initrd. the
kernel boots with the initrd and has script that do things like modprobe
things related to say networking device then init is called and the
runlevels do their thing. IIRC the initrd stuff is not logged, so that
would explain why there is not messages and since this happends before
the runlevels, you cant change the outcome. This is a bit of wild
speculation as this is a fuzzy area in my understanding. Any further
clarifictions welcomed. Udev always seems to be voodoo to use mortals.
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |

Attachment: signature.asc
Description: Digital signature


Reply to: