Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-27 Thread Willie WY Wong
On Sun, Feb 26, 2012 at 07:00:52PM -0600, Penguin Lover Dale squawked:
> You should read the thread " rfc: only the loopback interface should
> provide net" on -dev.  They were discussing the changes in this.  Maybe
> those changes had something to do with what happened here.
> 
> Dale
> 

Thanks Dale! That explains why OpenRC 0.9.9 works differently from
before. And seeing that NetworkManager provides net also, maybe so
should wicd? 

W
-- 
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton




Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Dale
Dan Johansson wrote:
> On Sunday 26 February 2012 17.52:13 Dan Johansson wrote:
>> On Sunday 26 February 2012 15.19:54 Willie WY Wong wrote:
>>> On Sun, Feb 26, 2012 at 10:35:35AM +0100, Penguin Lover Willie WY Wong 
>>> squawked:
 Can someone help me figure out how to find the offending initscript that 
 is 
 needlessly calling dhcpcd? 
>>>
>>> Apparently the culprit is /etc/init.d/netmount
>>> I am not sure how it got into the default run level, since I don't use
>>> any network file systems on my netbook. 
>>
>> And on my laptop the culprit seems to be /etc/init.d/sshd
> 
> At the moment I have solved it with putting "rc_dhcpcd_provide="!net"" in 
> /etc/rc.conf
> which prevents dhcpcd to start when sshd is started.
> 


You should read the thread " rfc: only the loopback interface should
provide net" on -dev.  They were discussing the changes in this.  Maybe
those changes had something to do with what happened here.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"



Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Willie WY Wong
On Sun, Feb 26, 2012 at 05:31:23PM +0200, Penguin Lover Alan McKinnon squawked:
> Here's what I've found after much up & down-grading and rebooting:
> 
> First, I've had netmount in the default runlevel for ages and it's
> worked for ages even though it does nothing.
> Second, openrc has been launching "dhcpcd -q" at boot time for ages and
> this has never interfered with wicd which comes along later.
> 
> openrc-0.8.* always works with any kernel version
> openrc-0.9* work with kernel-3.2.5
> 
> openrc-0.9* does not work with kernel-3.2.6, giving these errors:

snipped log-

> 
> That looks to me like avahi is all confused and tripping over what
> openrc & wicd do properly. I'd say the root cause is a change in
> kernel-3.2.6 that was not tested against.
> 

Alan: after re-reading your post, I have to retract my earlier
statement. It seems *your* problem is a separate one from the one that
Dan and I are having! 

I am running on 2.6.37. I just tried to upgrade to 3.2.6 earlier today
but ran into some other problems (there seems to be a bug in the
linux-3 kernel that breaks WEP for ath9k wireless cards, that and for
some reason `shutdown -h now' halts but does not power off; both are
known and there are patches, just haven't made it into the tree yet). 

The problem I was reporting has nothing to do with the kernel (same
kernel since last August). 

Cheers, 

W

Cheers, 

W
-- 
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton




Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Dan Johansson
On Sunday 26 February 2012 17.52:13 Dan Johansson wrote:
> On Sunday 26 February 2012 15.19:54 Willie WY Wong wrote:
> > On Sun, Feb 26, 2012 at 10:35:35AM +0100, Penguin Lover Willie WY Wong 
> > squawked:
> > > Can someone help me figure out how to find the offending initscript that 
> > > is 
> > > needlessly calling dhcpcd? 
> > 
> > Apparently the culprit is /etc/init.d/netmount
> > I am not sure how it got into the default run level, since I don't use
> > any network file systems on my netbook. 
> 
> And on my laptop the culprit seems to be /etc/init.d/sshd

At the moment I have solved it with putting "rc_dhcpcd_provide="!net"" in 
/etc/rc.conf
which prevents dhcpcd to start when sshd is started.

-- 
Dan Johansson, 
***
This message is printed on 100% recycled electrons!
***



Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Dan Johansson
On Sunday 26 February 2012 15.19:54 Willie WY Wong wrote:
> On Sun, Feb 26, 2012 at 10:35:35AM +0100, Penguin Lover Willie WY Wong 
> squawked:
> > Can someone help me figure out how to find the offending initscript that is 
> > needlessly calling dhcpcd? 
> 
> Apparently the culprit is /etc/init.d/netmount
> I am not sure how it got into the default run level, since I don't use
> any network file systems on my netbook. 

And on my laptop the culprit seems to be /etc/init.d/sshd

-- 
Dan Johansson, 
***
This message is printed on 100% recycled electrons!
***



Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Alan McKinnon
On Sun, 26 Feb 2012 15:19:54 +0100
Willie WY Wong  wrote:

> On Sun, Feb 26, 2012 at 10:35:35AM +0100, Penguin Lover Willie WY
> Wong squawked:
> > Can someone help me figure out how to find the offending initscript
> > that is needlessly calling dhcpcd? 
> 
> Apparently the culprit is /etc/init.d/netmount
> I am not sure how it got into the default run level, since I don't use
> any network file systems on my netbook. 

I believe the problem is much deeper than that and while your
observations are valid, you don't have a root cause yet. You just have
a happy symptom that works with your specific configuration.

Here's what I've found after much up & down-grading and rebooting:

First, I've had netmount in the default runlevel for ages and it's
worked for ages even though it does nothing.
Second, openrc has been launching "dhcpcd -q" at boot time for ages and
this has never interfered with wicd which comes along later.

openrc-0.8.* always works with any kernel version
openrc-0.9* work with kernel-3.2.5

openrc-0.9* does not work with kernel-3.2.6, giving these errors:

Feb 26 17:16:53 khamul dhcpcd[2661]: wlan0: leased 172.20.0.41 for
43200 seconds 
Feb 26 17:16:53 khamul avahi-daemon[2479]: Joining mDNS multicast group
on interface wlan0.IPv4 with address 172.20.0.41. 
Feb 26 17:16:53 khamul avahi-daemon[2479]: New relevant interface
wlan0.IPv4 for mDNS. 
Feb 26 17:16:53 khamul avahi-daemon[2479]: Registering new address
record for 172.20.0.41 on wlan0.IPv4. 
Feb 26 17:16:54 khamul dhcpcd[2661]: eth0: sending IPv6 Router
Solicitation
Feb 26 17:16:54 khamul dhcpcd[2661]: eth0: sendmsg: Network is
unreachable 
Feb 26 17:16:55 khamul dhcpcd[4388]: sending commands to master dhcpcd
process 
Feb 26 17:16:55 khamul dhcpcd[2661]: control command: /sbin/dhcpcd -k
wlan0 
Feb 26 17:16:55 khamul dhcpcd[2661]: wlan0: releasing lease of
172.20.0.41 
Feb 26 17:16:55 khamul avahi-daemon[2479]: Withdrawing address record
for 172.20.0.41 on wlan0. 
Feb 26 17:16:55 khamul avahi-daemon[2479]: Leaving mDNS multicast group
on interface wlan0.IPv4 with address 172.20.0.41. 
Feb 26 17:16:55 khamul avahi-daemon[2479]: Interface wlan0.IPv4 no
longer relevant for mDNS. 
Feb 26 17:16:55 khamul dhcpcd[2661]: wlan0: open_udp_socket: Cannot
assign requested address 
Feb 26 17:16:55 khamul kernel: [   58.240866] wlan0: deauthenticating
from 00:04:ed:45:65:df by local choice (reason=3)

That looks to me like avahi is all confused and tripping over what
openrc & wicd do properly. I'd say the root cause is a change in
kernel-3.2.6 that was not tested against.

So, what's the next debugging step?


-- 
Alan McKinnnon
alan.mckin...@gmail.com




Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Willie WY Wong
On Sun, Feb 26, 2012 at 10:35:35AM +0100, Penguin Lover Willie WY Wong squawked:
> Can someone help me figure out how to find the offending initscript that is 
> needlessly calling dhcpcd? 

Apparently the culprit is /etc/init.d/netmount
I am not sure how it got into the default run level, since I don't use
any network file systems on my netbook. 

Cheers, 
W
-- 
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton




Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Willie WY Wong
On Sun, Feb 26, 2012 at 07:32:43AM -0600, Penguin Lover Dale squawked:
> This may not be it but worth taking a look at.  /etc/rc.conf  From that
> file:
> 
> # rc_hotplug is a list of services that we allow to be hotplugged.
> # By default we do not allow hotplugging.
> # A hotplugged service is one started by a dynamic dev manager when a
> matching
> # hardware device is found.
> # This service is intrinsically included in the boot runlevel.
> # To disable services, prefix with a !
> # Example - rc_hotplug="net.wlan !net.*"
> # This allows net.wlan and any service not matching net.* to be plugged.
> # Example - rc_hotplug="*"
> # This allows all services to be hotplugged
> #rc_hotplug="*"
> 
> I think that should be off by default but maybe try disabling them all
> manually just in case.
> 

Hotplug has never been turned on in my case. 

I've always had

rc_hotplug="!net.*" 

W
-- 
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton




Re: [gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Dale
Willie WY Wong wrote:
> On Thursday night, I emerged some packages
> 
<< SNIP >>
> Can someone help me figure out how to find the offending initscript that is 
> needlessly calling dhcpcd? 
> 
> Cheers, 
> W



This may not be it but worth taking a look at.  /etc/rc.conf  From that
file:

# rc_hotplug is a list of services that we allow to be hotplugged.
# By default we do not allow hotplugging.
# A hotplugged service is one started by a dynamic dev manager when a
matching
# hardware device is found.
# This service is intrinsically included in the boot runlevel.
# To disable services, prefix with a !
# Example - rc_hotplug="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
# Example - rc_hotplug="*"
# This allows all services to be hotplugged
#rc_hotplug="*"

I think that should be off by default but maybe try disabling them all
manually just in case.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"



[gentoo-user] Why is dhcpcd starting by itself?

2012-02-26 Thread Willie WY Wong
On Thursday night, I emerged some packages

Thu Feb 23 23:26:44 2012 >>> net-libs/webkit-gtk-1.6.3-r300
Thu Feb 23 23:29:44 2012 >>> www-client/midori-0.4.3
Thu Feb 23 23:45:36 2012 >>> sys-apps/portage-2.1.10.49
Thu Feb 23 23:52:50 2012 >>> media-libs/libpng-1.5.9
Thu Feb 23 23:53:45 2012 >>> sys-apps/openrc-0.9.9
Thu Feb 23 23:56:43 2012 >>> dev-libs/libgcrypt-1.5.0-r2
Thu Feb 23 23:58:35 2012 >>> media-libs/libmikmod-3.2.0_beta2-r5
Thu Feb 23 23:59:20 2012 >>> media-libs/vo-aacenc-0.1.2
Fri Feb 24 00:00:44 2012 >>> dev-libs/libevent-2.0.17
Fri Feb 24 00:06:11 2012 >>> dev-libs/libxml2-2.7.8-r5
Fri Feb 24 00:07:26 2012 >>> media-sound/alsa-utils-1.0.25-r1
Fri Feb 24 00:08:35 2012 >>> sys-apps/file-5.11
Fri Feb 24 00:10:28 2012 >>> media-libs/imlib2-1.4.5
Fri Feb 24 00:15:00 2012 >>> sys-apps/util-linux-2.20.1-r2
Fri Feb 24 00:15:18 2012 >>> dev-util/intltool-0.50.1
Fri Feb 24 00:19:57 2012 >>> net-print/hplip-3.12.2-r1
Fri Feb 24 00:23:30 2012 >>> media-sound/mpd-0.16.7
Fri Feb 24 00:23:47 2012 >>> dev-tex/latexmk-430a
Fri Feb 24 00:24:20 2012 >>> dev-tex/latex-beamer-3.13

On Friday morning, I started having network problems. wicd would try
to connect to the access point, and fail. 

[   49.754744] r8169 :01:00.0: eth0: link down
[   50.958354] r8169 :01:00.0: eth0: link down
[   52.349167] wlan0: authenticate with 00:01:e3:4b:4a:6d (try 1)
[   52.355694] wlan0: authenticated
[   52.355762] wlan0: associate with 00:01:e3:4b:4a:6d (try 1)
[   52.358116] wlan0: RX AssocResp from 00:01:e3:4b:4a:6d (capab=0x411 status=0 
aid=6)
[   52.358130] wlan0: associated
[   58.579496] wlan0: deauthenticating from 00:01:e3:4b:4a:6d by local choice 
(reason=3)
[   58.589726] cfg80211: Calling CRDA to update world regulatory domain
[   58.751572] r8169 :01:00.0: eth0: link down
[   59.954878] r8169 :01:00.0: eth0: link down
[   61.359184] wlan0: authenticate with 00:01:e3:4b:4a:6d (try 1)
[   61.365490] wlan0: authenticated
[   61.365561] wlan0: associate with 00:01:e3:4b:4a:6d (try 1)
[   61.367884] wlan0: RX AssocResp from 00:01:e3:4b:4a:6d (capab=0x411 status=0 
aid=6)
[   61.367898] wlan0: associated
[   65.108874] wlan0: deauthenticating from 00:01:e3:4b:4a:6d by local choice 
(reason=3)
[   65.119716] cfg80211: Calling CRDA to update world regulatory domain
[   65.295639] r8169 :01:00.0: eth0: link down
[  262.492240] r8169 :01:00.0: eth0: link down

A bit of tracking plus memories of bygone days led me to realise that, 
for some reason, the two copies of dhcpcd client were being run! One
was started by wicd, after it associates to the AP. But how'bout the
other one? 

Well, on boot up this morning, I saw that, for the first time in a
*very long while* that DHCPCD is being started at boot time as a
service. Now, I am sure I didn't include it as a service. 

Gee-Mi-Ni ~ # rc-update show
alsasound |  default
 bootmisc | boot
  consolefont | boot
 dbus |  default
devfs |sysinit
dmesg |sysinit
 fsck | boot
  gpm |  default
 hostname | boot
  hwclock | boot
  keymaps | boot
killprocs |shutdown
local |  default nonetwork
   localmount | boot
  metalog | boot
  modules | boot
 mount-ro |shutdown
 mtab | boot
   net.lo | boot
 netmount |  default
   procfs | boot
 root | boot
savecache |shutdown
 swap | boot
swapfiles | boot
   sysctl | boot
 termencoding | boot
 udev |sysinit
   udev-postmount |  default
  urandom | boot
 wicd | boot

Okay, on the other hand rc-status showed something I haven't seen before

Dynamic Runlevel: needed
 sysfs[started]
 dhcpcd   [started]

Huh, simple enough, some other service needs dhcpcd to be running. Okay. Let me 
see which one it is:

Gee-Mi-Ni init.d # grep dhcpcd /etc/init.d/*
/etc/init.d/dhcpcd:command=/sbin/dhcpcd
/etc/init.d/dhcpcd:pidfile=/var/run/dhcpcd.pid
/etc/init.d/wpa_supplicant: before dns dhcpcd net

uh, apparently none of them? 

Can someone help me figure out how to find the offending initscript that is 
needlessly calling dhcpcd? 

Cheers, 
W
-- 
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton