Re: devd *NOT* called on wi0 insert?

2003-09-07 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
David Gilbert <[EMAIL PROTECTED]> writes:
: > "M" == M Warner Losh <[EMAIL PROTECTED]> writes:
: 
: M> In message: <[EMAIL PROTECTED]> Larry
: M> Rosenman <[EMAIL PROTECTED]> writes: : I have a (within the week)
: M> -CURRENT system.  If I boot with my Linksys : WPC11 V.3 card
: M> inserted : I get the dhcp actions and all is fine.  If I remove the
: M> card, we don't : kill off dhclient.  : : If I boot without the
: 
: Actually, I think devd needs to be significantly smarter.  Consider
: the average laptop: one or more permanent interfaces and one or more
: transient interfaces.

The current devd is smart enough.  Devd's config file might use some
additional tweaking.

: Currently, if bge0 (my permanent interface) has link at boot, it gets
: dhclient.  Similarly to the origional poster, if wi0 is inserted at
: boot, it gets dhclient.

Don't blame devd for dhclient being brain dead.  Fix the brain damage
in dhclient, don't use devd to work around that brain damage.

: devd doesn't seem to do much else.

Devd does anything you want it to do.

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: devd *NOT* called on wi0 insert?

2003-09-07 Thread David Gilbert
> "M" == M Warner Losh <[EMAIL PROTECTED]> writes:

M> In message: <[EMAIL PROTECTED]> Larry
M> Rosenman <[EMAIL PROTECTED]> writes: : I have a (within the week)
M> -CURRENT system.  If I boot with my Linksys : WPC11 V.3 card
M> inserted : I get the dhcp actions and all is fine.  If I remove the
M> card, we don't : kill off dhclient.  : : If I boot without the

Actually, I think devd needs to be significantly smarter.  Consider
the average laptop: one or more permanent interfaces and one or more
transient interfaces.

Currently, if bge0 (my permanent interface) has link at boot, it gets
dhclient.  Similarly to the origional poster, if wi0 is inserted at
boot, it gets dhclient.

devd doesn't seem to do much else.

There is a caveat, of course.  You can't run multiple copies of
dhclient (say one for each interface).  This is broken.  You must, in
fact, run one copy of dhclient listing all the interfaces to
configure.  This is contrary (say) to moused ... which works well with
multiple mice.

Ideally, you would start dhclient on an interface when it had link and
stop it when it lost link.  You might want to put a 10 or 15 second
timeout on that (as it could be annoying with a flakey controller),
but this makes sense.  In this case, devd would not only have to watch
changes to the device tree, but device state transitions.

Less ideally, dhclient should run on all capable interfaces whenever
they're present.  In the current scheme, this requires some external
smarts as you must kill off the current dhclient and restart it with a
new list of interfaces.

Dave.

-- 

|David Gilbert, Independent Contractor.   | Two things can only be |
|Mail:   [EMAIL PROTECTED]|  equal if and only if they |
|http://daveg.ca  |   are precisely opposite.  |
=GLO
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: devd *NOT* called on wi0 insert?

2003-09-06 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
Larry Rosenman <[EMAIL PROTECTED]> writes:
: However, I still am not impressed with the devd.conf(5) man page.  It could
: be lots more helpful.

agreed 100%

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: devd *NOT* called on wi0 insert?

2003-09-06 Thread Larry Rosenman


--On Friday, September 05, 2003 15:41:22 -0500 Larry Rosenman 
<[EMAIL PROTECTED]> wrote:

> Although I'd like to tell it NOT to config the onboard rl0 interface.
: >
: > Will ifconfig_rl0="NO" do that?
: In answer to my own question, the answer is NO.
:
: So, we still need a way to do that.
You can use tell devd.conf to say that all attachemnts to the pci bus
do nothing.
Could I impose on you to give me the magic?  I'm confused and want to
learn.
Again in answer to my own question:
$ diff -c /usr/src/etc/devd.conf /etc/devd.conf
*** /usr/src/etc/devd.conf  Thu Aug 21 21:23:04 2003
--- /etc/devd.conf  Sat Sep  6 03:16:09 2003
***
*** 63,68 
--- 63,73 
   action "camcontrol rescan all";
 };
+ attach 20 {
+ device-name "rl0";
+ action "echo rl0 config skipped";
+ };
+
 # Don't even try to second guess what to do about drivers that don't
 # match here.  Instead, pass it off to syslog.  Commented out for the
 # moment, as pnpinfo isn't set in devd yet
However, I still am not impressed with the devd.conf(5) man page.  It could
be lots more helpful.
LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


Re: devd *NOT* called on wi0 insert?

2003-09-05 Thread Larry Rosenman


--On Friday, September 05, 2003 14:37:04 -0600 "M. Warner Losh" 
<[EMAIL PROTECTED]> wrote:

In message: <[EMAIL PROTECTED]>
Larry Rosenman <[EMAIL PROTECTED]> writes:
:
:
: --On Friday, September 05, 2003 14:37:39 -0500 Larry Rosenman
: <[EMAIL PROTECTED]> wrote:
:
: >
: >
: > --On Friday, September 05, 2003 13:30:03 -0600 "M. Warner Losh"
: > <[EMAIL PROTECTED]> wrote:
: >
:
: >> I do have pccard_ifconfig=DHCP in my rc.conf.
: > Aha!  I added this, and it now works(tm).
: >
: > Although I'd like to tell it NOT to config the onboard rl0 interface.
: >
: > Will ifconfig_rl0="NO" do that?
: In answer to my own question, the answer is NO.
:
: So, we still need a way to do that.
You can use tell devd.conf to say that all attachemnts to the pci bus
do nothing.
Could I impose on you to give me the magic?  I'm confused and want to learn.

LER

Warner


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


Re: devd *NOT* called on wi0 insert?

2003-09-05 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
Larry Rosenman <[EMAIL PROTECTED]> writes:
: 
: 
: --On Friday, September 05, 2003 14:37:39 -0500 Larry Rosenman 
: <[EMAIL PROTECTED]> wrote:
: 
: >
: >
: > --On Friday, September 05, 2003 13:30:03 -0600 "M. Warner Losh"
: > <[EMAIL PROTECTED]> wrote:
: >
: 
: >> I do have pccard_ifconfig=DHCP in my rc.conf.
: > Aha!  I added this, and it now works(tm).
: >
: > Although I'd like to tell it NOT to config the onboard rl0 interface.
: >
: > Will ifconfig_rl0="NO" do that?
: In answer to my own question, the answer is NO.
: 
: So, we still need a way to do that.

You can use tell devd.conf to say that all attachemnts to the pci bus
do nothing.

Warner

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: devd *NOT* called on wi0 insert?

2003-09-05 Thread Larry Rosenman


--On Friday, September 05, 2003 14:37:39 -0500 Larry Rosenman 
<[EMAIL PROTECTED]> wrote:



--On Friday, September 05, 2003 13:30:03 -0600 "M. Warner Losh"
<[EMAIL PROTECTED]> wrote:

I do have pccard_ifconfig=DHCP in my rc.conf.
Aha!  I added this, and it now works(tm).

Although I'd like to tell it NOT to config the onboard rl0 interface.

Will ifconfig_rl0="NO" do that?
In answer to my own question, the answer is NO.

So, we still need a way to do that.

Also, interestingly, with the /etc/rc.d/devd script modified to start devd 
with the
-D option, my dmesg gets wiped out. :-(

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


Re: devd *NOT* called on wi0 insert?

2003-09-05 Thread Larry Rosenman


--On Friday, September 05, 2003 13:30:03 -0600 "M. Warner Losh" 
<[EMAIL PROTECTED]> wrote:

In message: <[EMAIL PROTECTED]>
Larry Rosenman <[EMAIL PROTECTED]> writes:
: I have a (within the week) -CURRENT system.  If I boot with my Linksys
: WPC11 V.3 card inserted
: I get the dhcp actions and all is fine.  If I remove the card, we don't
: kill off dhclient.
:
: If I boot without the card, and then insert it later, I do NOT get
dhclient  : starting.
:
: I modified /etc/rc.d/devd to start devd with the -D switch, and it
appears  : to my
: untrained eyes that devd is NOT being called on the insert.
:
: What can I get to help debug this?
:

Is devd running?
yes.
What is the output of devd
all the stuff except for wi0 (but see below).
I know this is working, because I use it every single day many times a
day with both ath and wi.
I do have pccard_ifconfig=DHCP in my rc.conf.
Aha!  I added this, and it now works(tm).

Although I'd like to tell it NOT to config the onboard rl0 interface.

Will ifconfig_rl0="NO" do that?


Maybe you have a second dhclient running.
Nope.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


Re: devd *NOT* called on wi0 insert?

2003-09-05 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
Larry Rosenman <[EMAIL PROTECTED]> writes:
: I have a (within the week) -CURRENT system.  If I boot with my Linksys 
: WPC11 V.3 card inserted
: I get the dhcp actions and all is fine.  If I remove the card, we don't 
: kill off dhclient.
: 
: If I boot without the card, and then insert it later, I do NOT get dhclient 
: starting.
: 
: I modified /etc/rc.d/devd to start devd with the -D switch, and it appears 
: to my
: untrained eyes that devd is NOT being called on the insert.
: 
: What can I get to help debug this?
: 
: /etc/rc.conf:
: 
: # -- sysinstall generated deltas -- # Thu Apr  3 13:56:26 2003
: # Created: Thu Apr  3 13:56:26 2003
: # Enable network daemons for user convenience.
: # Please make all changes to this file, not to /etc/defaults/rc.conf.
: # This file now contains just the overrides from /etc/defaults/rc.conf.
: kern_securelevel_enable="NO"
: linux_enable="YES"
: moused_enable="YES"
: sendmail_enable="YES"
: sshd_enable="YES"
: usbd_enable="YES"
: hostname="lerlaptop"
: devd_enable="YES"
: dumpdev="/dev/ad0s1b"
: dumpdir="/shared/crash/current"
: 
: apm_enable="YES"  # Set to YES to enable APM BIOS functions (or NO).
: apmd_enable="YES" # Run apmd to handle APM event from userland.
: ifconfig_wi0="DHCP"
: lpd_enable="YES"  # Run the line printer daemon.
: lpd_flags="-l"# Flags to lpd (if enabled).
: inetd_enable="YES"# Run the network daemon dispatcher (YES/NO).
: clear_tmp_enable="YES"# Clear /tmp at startup.

Is devd running?

What is the output of devd 

I know this is working, because I use it every single day many times a
day with both ath and wi.

I do have pccard_ifconfig=DHCP in my rc.conf.

Maybe you have a second dhclient running.

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"