Think in G

Never stop ThinkinG…

Archive for the ‘Lucid’ tag

解决了重启/关机时cifs超时的问题

without comments

{lang: 'zh-CN'}

自从换了10.04后,系统重启/关机时,cifs超时的老问题又出来了,要等上一分钟左右才有反应。launchpad上也有很多与此有关的bug(参见这里)。

根据帖子里几个兄弟的回复,尝试了调整umountnfs.sh的顺序,但是始终没有办法避免这个问题。

今天偶尔google到了这篇blog,终于解决了这个问题。
做法很简单,只要修改/etc/init/network-manager.conf,加入一段pre-stop script即可,完整的配置文件如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# network-manager - network connection manager
#
# The Network Manager daemon manages the system's network connections,
# automatically switching between the best available.

description "network connection manager"

# fix the cifs timeout on reboot/shutdown
# http://swiss.ubuntuforums.org/showthread.php?t=1396770
pre-stop script
    trap "Caught TERM Signal" TERM
    /etc/init.d/umountnfs.sh
    trap - TERM
end script

start on (local-filesystems
      and started dbus)
stop on stopping dbus

expect fork
respawn

exec NetworkManager
分享家:Addthis中国
{lang: 'zh-CN'}

Written by ghawk.gu

May 29th, 2010 at 9:44 pm

Posted in 兴趣,系统安装配置,软件

Tagged with ,