Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using version 1.7.1_pre20120127 with python 2.7.2:

[U] net-misc/wicd
     Available versions:  1.7.0 (~)1.7.0-r1 1.7.1_beta2-r4 (~)1.7.1_pre20111210-r1 1.7.1_pre20120127 (~)1.7.1_pre20120127-r1 (~)1.7.1 (~)1.7.1-r1 {X ambiance +gtk ioctl libnotify mac4lin ncurses nls +pm-utils}
     Installed versions:  1.7.1_pre20120127(01:42:42 PM 02/29/2012)(X gtk libnotify ncurses nls pm-utils -ioctl -mac4lin)
     Homepage:            http://wicd.sourceforge.net/
     Description:         A lightweight wired and wireless network manager for Linux

If I add wicd to the defaults runlevel, it always ask for root password after boot. But if I add it to the boot runlevel, there is no connection (both wired and wireless):

2012/02/29 21:13:36 :: Using wired interface...eth0
2012/02/29 21:13:41 :: Autoconnecting...
2012/02/29 21:13:41 :: Attempting to autoconnect with wired interface...
2012/02/29 21:13:41 :: Putting interface down
2012/02/29 21:13:41 :: Releasing DHCP leases...
2012/02/29 21:13:41 :: Setting false IP...
2012/02/29 21:13:41 :: Flushing the routing table...
2012/02/29 21:13:41 :: Putting interface up...
2012/02/29 21:13:44 :: Running DHCP with hostname gentoo
2012/02/29 21:13:44 :: dhcpcd[2699]: version 5.2.12 starting
2012/02/29 21:13:44 ::
2012/02/29 21:13:44 :: /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf: line 64: /etc/resolv.conf: Permission denied
2012/02/29 21:13:44 ::
2012/02/29 21:13:44 :: chmod: changing permissions of `/etc/resolv.conf': Operation not permitted
2012/02/29 21:13:44 ::
2012/02/29 21:13:44 :: dhcpcd[2699]: eth0: broadcasting for a lease
2012/02/29 21:13:44 ::
2012/02/29 21:13:44 :: dhcpcd[2699]: eth0: offered 192.168.15.36 from 192.168.15.1
2012/02/29 21:13:44 ::
2012/02/29 21:13:44 :: dhcpcd[2699]: eth0: acknowledged 192.168.15.36 from 192.168.15.1
2012/02/29 21:13:44 ::
2012/02/29 21:13:44 :: dhcpcd[2699]: eth0: checking for 192.168.15.36
2012/02/29 21:13:44 ::
2012/02/29 14:13:48 :: dhcpcd[2699]: eth0: leased 192.168.15.36 for 600 seconds
2012/02/29 14:13:48 ::
2012/02/29 14:13:48 :: /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf: line 64: /etc/resolv.conf: Permission denied
2012/02/29 14:13:48 ::
2012/02/29 14:13:48 :: chmod: changing permissions of `/etc/resolv.conf': Operation not permitted
2012/02/29 14:13:48 ::
2012/02/29 14:13:48 :: dhcpcd[2699]: forked to background, child pid 2769
2012/02/29 14:13:48 ::
2012/02/29 14:13:48 ::
2012/02/29 14:13:48 :: DHCP connection successful
2012/02/29 14:13:48 :: Connecting thread exiting.
2012/02/29 14:13:49 :: No wired connection present, attempting to autoconnect to wireless network 

You see the "Permission denied" error because I marked /etc/resolv.conf as immutable. Pay attention to the last line.

and here's the logs when manually restarting wicd:

2012/02/29 14:15:37 :: Using wired interface...eth0
2012/02/29 14:15:43 :: Autoconnecting...
2012/02/29 14:15:43 :: Putting interface downAttempting to autoconnect with wired interface...
2012/02/29 14:15:43 ::
2012/02/29 14:15:43 :: Releasing DHCP leases...
2012/02/29 14:15:43 :: Setting false IP...
2012/02/29 14:15:43 :: Flushing the routing table...
2012/02/29 14:15:43 :: Putting interface up...
2012/02/29 14:15:45 :: Running DHCP with hostname gentoo
2012/02/29 14:15:45 :: dhcpcd[3471]: version 5.2.12 starting
2012/02/29 14:15:45 ::
2012/02/29 14:15:45 :: /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf: line 64: /etc/resolv.conf: Permission denied
2012/02/29 14:15:45 ::
2012/02/29 14:15:45 :: chmod: changing permissions of `/etc/resolv.conf': Operation not permitted
2012/02/29 14:15:45 ::
2012/02/29 14:15:45 :: dhcpcd[3471]: eth0: broadcasting for a lease
2012/02/29 14:15:45 ::
2012/02/29 14:15:50 :: dhcpcd[3471]: eth0: offered 192.168.15.36 from 192.168.15.1
2012/02/29 14:15:50 ::
2012/02/29 14:15:50 :: dhcpcd[3471]: eth0: acknowledged 192.168.15.36 from 192.168.15.1
2012/02/29 14:15:50 ::
2012/02/29 14:15:50 :: dhcpcd[3471]: eth0: checking for 192.168.15.36
2012/02/29 14:15:50 ::
2012/02/29 14:15:56 :: dhcpcd[3471]: eth0: leased 192.168.15.36 for 600 seconds
2012/02/29 14:15:56 ::
2012/02/29 14:15:56 :: /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf: line 64: /etc/resolv.conf: Permission denied
2012/02/29 14:15:56 ::
2012/02/29 14:15:56 :: chmod: changing permissions of `/etc/resolv.conf': Operation not permitted
2012/02/29 14:15:56 ::
2012/02/29 14:15:56 :: dhcpcd[3471]: forked to background, child pid 3502
2012/02/29 14:15:56 ::
2012/02/29 14:15:56 ::
2012/02/29 14:15:56 :: DHCP connection successful
2012/02/29 14:15:56 :: Connecting thread exiting.
2012/02/29 14:16:00 :: Sending connection attempt result success

This problem is similar to: https://bbs.archlinux.org/viewtopic.php?id=121589, but the hardware clock is right and I can't found any script related to ntpdate in /etc/wicd/scripts/postconnect/.

Any ideas?


UPDATE: Fri Mar 2 16:36:12 ICT 2012

dhcpcd and wpa_supplicant are already removed from the default runlevel:

gentoo ~ # rc-update -v show | grep dhcpcd
               dhcpcd |                                 
gentoo ~ # rc-update -v show | grep wpa
       wpa_supplicant |              

net.eth0 is deleted:

gentoo ~ # rc-update -v show | grep eth0
             net.eth0 |            

Reply to Kyle Jones:

To check if your configuration disagrees with the setting of your hardware clock, run

date; /sbin/hwclock --show
# date; hwclock --show
Sun Mar  4 11:41:53 ICT 2012
Sun 04 Mar 2012 11:41:54 AM ICT  -0.697282 seconds

# grep -v ^# /etc/conf.d/hwclock | sed '/^[ \t]*$/d'
clock="UTC"
clock_systohc="NO"
clock_hctosys="NO"
clock_args=""

UPDATE Tue Mar 6 09:49:14 ICT 2012

Today, the logs say "successful" but wicd cannot connect to any network:

Putting interface up...
Running DHCP with hostname gentoo
dhcpcd[5063]: version 5.2.12 starting

dhcpcd[5063]: eth0: broadcasting for a lease

dhcpcd[5063]: eth0: offered 192.168.15.36 from 192.168.15.1

dhcpcd[5063]: eth0: acknowledged 192.168.15.36 from 192.168.15.1

dhcpcd[5063]: eth0: checking for 192.168.15.36

dhcpcd[5063]: eth0: leased 192.168.15.36 for 600 seconds

dhcpcd[5063]: forked to background, child pid 5094


DHCP connection successful
Connecting thread exiting.
Sending connection attempt result success

wicd-gtk shows "Not connected" and eth0 has no IP:

eth0      Link encap:Ethernet  HWaddr 00:13:a9:4f:84:44  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1860 errors:0 dropped:2 overruns:0 frame:0
          TX packets:301 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:205470 (200.6 KiB)  TX bytes:34017 (33.2 KiB)
          Interrupt:16 
share|improve this question
    
Have you followed the installation instructions at the Gentoo wiki? E.g. removed dhcpd and wpa_supplicant (and net.eth0 if you intend to use wicd for eth0) from being started by default (so wicd can handle them)? –  sr_ Mar 2 '12 at 9:33
    
Sure, I followed this one too. Updated my question. –  quanta Mar 2 '12 at 9:49
    
How does rc.sysinit (or whatever) use those clock_* variables? –  Kyle Jones Mar 4 '12 at 6:52
    
Here's the init script for hwclock. –  quanta Mar 5 '12 at 4:05

2 Answers 2

Most likely there's disagreement between the timezone your hardware clock is set to (either UTC or your local timezone) and what your Linux system configuration thinks it is set to. If they differ, hwclock will set the system clock incorrectly during system initialization and later the NTP daemon will fix the system clock when it notices your system time is off by the number of hours your local timezone is away from UTC.

To check if your configuration disagrees with the setting of your hardware clock, run

date; /sbin/hwclock --show

If the times displayed are hours apart, then your configuration doesn't match your hardware clock setting. I'm not familiar with how Gentoo configuration works, but on some other Linux distros, you would edit /etc/sysconfig/clock and set UTC=true or UTC=false depending on whether your hardware clock was set to UTC or not. I think your hardware clock is set to your local timezone, so you need UTC=false.

share|improve this answer
    
updated my question. –  quanta Mar 4 '12 at 4:57
up vote 0 down vote accepted

Problem solved! The culprit is... hwclock.

As I said above, belows is the config. for my hwclock:

clock="UTC"
clock_systohc="NO"
clock_hctosys="NO"
clock_args=""

but I have this (silly) line in /etc/local.d/baselayout1.start:

hwclock --hctosys

With this config, here're the date time after booting up:

gentoo ~ # hwclock 
Wed 21 Mar 2012 10:29:57 AM ICT  -0.134053 seconds
gentoo ~ # hwclock --utc
Wed 21 Mar 2012 05:30:01 PM ICT  -0.928500 seconds
gentoo ~ # date
Wed Mar 21 10:30:03 ICT 2012
gentoo ~ # date --utc
Wed Mar 21 03:30:06 UTC 2012

The hwclock and the date output are right, the hwclock --utc is 7 hours later than, and the date --utc is 7 hours earlier than.

Remove this line hwclock --hctosys in /etc/local.d/baselayout1.start and change clock_systohc and clock_hctosys to "YES" in /etc/conf.d/hwclock solve the problem:

gentoo ~ # hwclock 
Wed 21 Mar 2012 03:33:43 AM ICT  -0.404693 seconds
gentoo ~ # hwclock --utc
Wed 21 Mar 2012 10:33:46 AM ICT  -0.418345 seconds
gentoo ~ # date
Wed Mar 21 10:33:48 ICT 2012
gentoo ~ # date --utc
Wed Mar 21 03:33:54 UTC 2012
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.