|
|
当我运行ntpq -p来检查我的ntp运行的status的时候,我发现我的ntp不好使,
但是运行/etc/inin.d/ntp restart以后ntp就好使了,
在freenode的#debian上一番询问,发现是dhcp的问题,
在debian系统中ntpd这个程序是在dhcp配置好之前就运行了,
也就是说,网络还没有配置好呢,ntp就开始出去和对时服务器搭讪去了,结果必然是失败啊,
所以我想问问怎么能调整开机运行顺序,貌似这个比较难一点,
或者是在/etc/network/if-up.d/里面写个什么脚本,貌似这个比较容易一点,
我尝试了在/etc/network/if-up.d/里面写一个如下的脚本:
#! /bin/sh
/etc/inin.d/ntp restart
结果不行,谁来指点一下啊。 :yun:
==============================================
Seems, the following solution dosn't work properly, but when I tested it last time it's fine. :yun:
Solution:
[QUOTE]# cd /etc/rc2.d
# mv S23ntp S99ntp
Reference: http://www.debian.org/doc/manuals/debian-reference/ch03.en.html
[/QUOTE]
Current Solution:
Now I solve this problem by adding a script in the "/etc/network/if-up.d/" directory.
cat /etc/network/if-up.d/ntp
#! /bin/sh
dpkg-reconfigure ntp
Welcome any suggestions. |
|