On Mon, Feb 11, 2008 at 01:23:57PM +1100, Robert Jenssen wrote: > Hi, > > Thanks for the prompt reply. By "owned", I meant that "ps -ajx" > shows /sbin/devd as the process group leader. For example, at the moment on > my system: > > [root etc]ps -axj | grep devd > root 5727 1 5727 5727 0 Is ?? 0:00.00 /sbin/devd > [root etc]ps -axj | grep dhclient > root 6373 1 5727 5727 0 I ?? 0:00.00 dhclient: ral0 > _dhcp 6395 1 6395 6395 0 Ss ?? 0:00.09 dhclient: ral0 > [root etc] > > I agree, /sbin/devd calls /etc/rc.d/dhclient which checks for the existence > of > a running dhclient. I find the rc scripts hard to follow but so far as I can > see /etc/rc.d/netif simply calls "ifconfig dhcp" and doesn't check for a > running dhclient.
The head of the process group is completely irrelevent and has no effect. /etc/rc.d/netif litereally calls /etc/rc.d/dhclient is most definitly does not call "ifconfig dhcp" since no varient of that has ever worked. if dhcpif $1; then if [ $_cfg -ne 0 ] ; then ifconfig $1 up fi if syncdhcpif $1; then /etc/rc.d/dhclient start $1 fi _cfg=0 fi > Here are the relevant lines in my rc.conf: > > rc_debug="YES" > ifconfig_ral0="inet dhcp channel 10 wpa up" "inet" is wrong here and "channel 10" is pointless unless you're running an AP or in ad-hoc mode. You're basically luck that anything works for you since this generates a completely bogus ifconfig command. > devd_enable="YES" > > Here is the output of "/etc/rc.d/netif restart": > > [root etc]rc.d/netif restart > rc.d/netif: DEBUG: run_rc_command: doit: network_stop > Stopping network:Stopping wpa_supplicant. > /etc/rc.d/wpa_supplicant: DEBUG: run_rc_command: doit: kill -TERM 6229 > /etc/rc.d/dhclient: DEBUG: run_rc_command: doit: dhclient_stop > lo0 fwip0 fwe0 rl0 ral0 plip0rc.d/netif: DEBUG: The following interfaces > were > not configured: > . > rc.d/netif: DEBUG: run_rc_command: doit: network_start > rc.d/netif: DEBUG: Cloned: > Starting wpa_supplicant. > /etc/rc.d/wpa_supplicant: DEBUG: run_rc_command: > doit: /usr/sbin/wpa_supplicant -q -B -i ral0 -c /etc/wpa_supplicant.conf -D > bsd -P /var/run/wpa_supplicant/ral0.pid > rc.d/netif: DEBUG: checkyesno: synchronous_dhclient is set to YES. > /etc/rc.d/dhclient: DEBUG: run_rc_command: doit: dhclient_start > /etc/rc.d/dhclient: DEBUG: checkyesno: background_dhclient is set to NO. > ral0: no link ............ got link > DHCPREQUEST on ral0 to 255.255.255.255 port 67 > DHCPDISCOVER on ral0 to 255.255.255.255 port 67 interval 8 > DHCPOFFER from 192.168.0.1 > DHCPREQUEST on ral0 to 255.255.255.255 port 67 > DHCPACK from 192.168.0.1 > bound to 192.168.0.4 -- renewal in 43200 seconds. > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 > inet6 ::1 prefixlen 128 > inet 127.0.0.1 netmask 0xff000000 > ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 > ether 00:xx:.... > inet 192.168.0.4 netmask 0xffffff00 broadcast 192.168.0.255 > media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps) > status: associated > ssid xxxxxxxxxxxx channel 10 (2457 Mhz 11g) bssid 00:xx:..... > authmode WPA privacy ON deftxkey UNDEF TKIP 3:128-bit txpower 50 > bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 > roam:rssi11g 7 roam:rate11g 5 protmode CTS roaming MANUAL > rc.d/netif: DEBUG: The following interfaces were not configured: fwip0 fwe0 > rl0 plip0 > /etc/rc.d/ipfilter: DEBUG: checkyesno: ipfilter_enable is set to NO. > > Now I have four dhclient processes: > > [root etc]ps -axj | grep dhclient > root 9824 1 5727 5727 0 S ?? 0:00.00 dhclient: ral0 > [pri > _dhcp 9853 1 9853 9853 0 Ss ?? 0:00.00 dhclient: ral0 > (dhc > _dhcp 9880 1 9880 9880 0 Ss ?? 0:00.00 dhclient: ral0 > (dhc > root 9826 1 9283 1916 0 S p0 0:00.00 dhclient: ral0 > [pri > > It seems that devd has started two new dhclients and netif has started its > own > pair as well. 1916 is the process id of the bash shell I su'ed from to > start /etc/rc.d/netif. Does you still set four processes in the steady state? That shouldn't happen since starting a second dhclient is supposed to kill the existing one. There should be two processes per interface due to the privege seperation model used by dhclient. -- Brooks
pgpmIcYSRxecs.pgp
Description: PGP signature