歡迎您光臨本站 註冊首頁

ubuntu 12.04 安裝ntpd無法自動啟動

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

ubuntu 12.04 安裝ntpd無法自動啟動

server:   Ubuntu 12.04 LTS  
          ntp-4.2.6p5
手動啟動正常。

root@NTP-ubunt:~# more /etc/init/ntpd.conf # ntpd
#

description     "ntpd start daemon"

start on runlevel
stop on runlevel [!2345]

expect fork
respawn

exec ntpd

root@NTP-ubunt:~$ tail -n 25 /var/log/kern.log
Aug  7 09:03:15 NTP-ubunt kernel: [    4.728339] type=1400 audit(1344301395.660:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=783 comm="apparmor_parser"
Aug  7 09:03:15 NTP-ubunt kernel: [    4.944770] init: ntpd main process (841) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    4.944810] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.008214] init: ntpd main process (860) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.008251] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.011591] init: ntpd main process (862) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.011628] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.016689] init: ntpd main process (864) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.016728] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.021344] init: ntpd main process (866) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.021382] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.026023] init: ntpd main process (868) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.026064] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.030721] init: ntpd main process (870) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.030758] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.035402] init: ntpd main process (872) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.035439] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.039915] init: ntpd main process (874) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.039955] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.044624] init: ntpd main process (876) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.044662] init: ntpd main process ended, respawning
Aug  7 09:03:15 NTP-ubunt kernel: [    5.049307] init: ntpd main process (878) terminated with status 1
Aug  7 09:03:15 NTP-ubunt kernel: [    5.049346] init: ntpd respawning too fast, stopped
Aug  7 09:03:16 NTP-ubunt kernel: [    5.217232] init: plymouth-upstart-bridge main process (747) killed by TERM signal
Aug  7 09:03:26 NTP-ubunt kernel: [   15.164635] eth0: no IPv6 routers present
《解決方案》

在upstart 中加了個腳本,sleep 30 && /usr/local/bin/ntpd 就可以了。

ntpd要在網路啟動之後啟。

[火星人 ] ubuntu 12.04 安裝ntpd無法自動啟動已經有863次圍觀

http://coctec.com/docs/service/show-post-12485.html