wicd - 啟動後沒有連接,必須手動重新啟動?
我正在使用版本 1.7.1_pre20120127 和 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
如果我將 wicd 添加到
defaults
執行級別,它總是在啟動後詢問 root 密碼。但是如果我將它添加到boot
執行級別,則沒有連接(有線和無線):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
您會看到“權限被拒絕”錯誤,因為我標記
/etc/resolv.conf
為不可變。注意最後一行。這是手動重新啟動 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
這個問題類似於:https://bbs.archlinux.org/viewtopic.php?id=121589,但是硬體時鐘是正確的,我找不到任何與 in 相關的
ntpdate
腳本/etc/wicd/scripts/postconnect/
。有任何想法嗎?
更新:2012 年 3 月 2 日星期五 16:36:12 ICT
dhcpcd
並且wpa_supplicant
已經從default
執行級別中刪除:gentoo ~ # rc-update -v show | grep dhcpcd dhcpcd | gentoo ~ # rc-update -v show | grep wpa wpa_supplicant |
net.eth0
被刪除:gentoo ~ # rc-update -v show | grep eth0 net.eth0 |
回复凱爾瓊斯:
要檢查您的配置是否與硬體時鐘的設置不一致,請執行
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=""
更新 2012 年 3 月 6 日星期二 09:49:14 ICT
今天,日誌顯示“成功”但
wicd
無法連接到任何網路: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
顯示“未連接”並且eth0
沒有 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
問題解決了!罪魁禍首是……hwclock。
正如我上面所說,下面是配置。對於我的時鐘:
clock="UTC" clock_systohc="NO" clock_hctosys="NO" clock_args=""
但我有這個(愚蠢的)行
/etc/local.d/baselayout1.start
:hwclock --hctosys
使用此配置,這是啟動後的日期時間:
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
hwclock
和date
輸出是對的,比hwclock --utc
晚date --utc
7小時,比早7小時。刪除此行
hwclock --hctosys
並更改/etc/local.d/baselayout1.start
並clock_systohc
解決clock_hctosys
問題:"YES"``/etc/conf.d/hwclock
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
您的硬體時鐘設置的時區(UTC 或您的本地時區)與您的 Linux 系統配置認為它設置的時區之間很可能存在分歧。如果它們不同,
hwclock
將在系統初始化期間錯誤地設置系統時鐘,稍後 NTP 守護程序將在發現您的系統時間偏離您的本地時區與 UTC 的小時數時修復系統時鐘。要檢查您的配置是否與硬體時鐘的設置不一致,請執行
date; /sbin/hwclock --show
如果顯示的時間相隔數小時,則您的配置與硬體時鐘設置不匹配。我不熟悉 Gentoo 配置的工作原理,但在其他一些 Linux 發行版上,您可以編輯 /etc/sysconfig/clock 並設置
UTC=true
或UTC=false
取決於您的硬體時鐘是否設置為 UTC。我認為您的硬體時鐘設置為您當地的時區,所以您需要UTC=false
.