Opened 16 years ago
Closed 16 years ago
#2444 closed defect (fixed)
/usr/sbin/ntpd is not running though it's running
Reported by: | Steffen Pankratz | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.3 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
Since upgrading to blfs-bootscripts-2re 0071221 the status of the ntp daemon is wrong.
ps aux | grep ntpd root 16665 0.0 0.0 3740 1260 ? SNs 21:12 0:00 /usr/sbin/ntpd /etc/rc.d/init.d/ntp status /usr/sbin/ntpd is not running.
Also there is no /var/run/ntpd.pid file which maybe the cause of the problem.
Any ideas on this?
Regards
-Steffen
Change History (10)
comment:1 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
Adding 'pidfile /var/run/ntpd.pid' to /etc/ntp.conf seems to be the easier path. I'd vote for that.
comment:3 by , 16 years ago
Thanks this works, I also vote for the second option because if you start ntpd without the init script, you can still use it to get the status and to shut down ntpd properly.
comment:4 by , 16 years ago
The only problem with the second option is that if you don't use the pidfile directive or you change the location, we don't know about it in the initscript. We could try to scrape the location from ntp.conf in the initscript, but it could be pretty ugly. Something like:
pidfile=$(awk '/pidfile/{if ($1 !~ /^#/) print $2}' /etc/ntp.conf)
comment:5 by , 16 years ago
Following the BLFS instructions a ntp.conf is created, so if you follow the book everything is fine
and if you are skilled enough the change something you should know what you are doing :)
Maybe you could add a comment "if you change this ... you have to change this too" or use your solution.
I have tested and it works.
follow-up: 8 comment:6 by , 16 years ago
In #2408, I think I'm going to back out the pid file changes to the bootscript since it causes some nasty problems. However, I would still like to add the "pidfile" directive to /etc/ntp.conf. At some later point when we can rely on fixed LFS bootscripts, we can add the "-p $pidfile" argument back to the bootscript.
Sound alright?
comment:8 by , 16 years ago
Description: | modified (diff) |
---|
Replying to dnicholson@linuxfromscratch.org:
Sound alright?
Very much. I've been seeing ntp begin to start (after I manually removed any stale pid file), and then decide the pid already existed and bail out leaving a new pid. Some of that was on clfs with blfs bootscripts, but I think some was also on LFS. I got as far as identifying it was somewhere in the functions script, and decided to revert the ntp script back to a previous version until I had time to look at it.
comment:9 by , 16 years ago
Egad! Trac thinks I changed the description - sorry if I did. I blame these (expletive-deleted) apple trackpads and laptop keyboards which can go crazy.
comment:10 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Oh, that's my fault. Thanks for reporting that. I added the -p argument to use a pid file, but I forgot that we don't instruct ntpd to use a pid file. There are two ways to change this.