If ntpd fails to start, .pid file is not removed. On next startup attempt, script fails to start. Most other init scripts will report that the program is already running in that situation. That will inform the user that a '/etc/init.d/ntpd zap' is required to reset the situation. ntpd-4.1.2 just says 'failed to start ntpd'. That is somewhat less than helpful. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Why is ntpd failing to start...what is the error ? Maybe if we checked for an error code we could do something about it. The problem you are reporting isn't really a ntpd bug, but also happens with bind, mysql, apache...if there is an error.
this may be related to a problem I am having with starting ntpd or ntp-client init scripts. I get a chown error that is being caused by this line in the init scripts. chown ntp:ntp /var/run/ntpd.pid The ebuild never created a ntp user or group, so this line just fails.
i dont know how you emerged ntp but every ebuild since 4.1.2 has added the ntp user/group
oh, yah, you are right. the way that the later ebuilds to the init script works... start() { checkconfig || return $? ebegin "Starting ntpd" touch /var/run/ntpd.pid chown ntp:ntp /var/run/ntpd.pid /usr/bin/ntpd -p /var/run/ntpd.pid ${NTPD_OPTS} eend $? "Failed to start ntpd" } stop() { ebegin "Stopping ntpd" if [ -e /var/run/ntpd.pid ] ; then kill `cat /var/run/ntpd.pid` rm -f /var/run/ntpd.pid fi eend $? "Failed to stop ntpd" } since there are major bugs open on the later builds...possibly this init should be backported, in addition to the ntp group -> ntp:ntp in the conf.d/ntpd fix.
everything is as it should be