Bug#376400: [pkg-ntp-maintainers] Bug#376400: ntp-simple: ntp cannnot open log and drift files

Blu blu at daga.cl
Tue Jul 4 20:13:26 UTC 2006


On Tue, Jul 04, 2006 at 07:56:46AM +0200, Kurt Roeckx wrote:
> On Mon, Jul 03, 2006 at 09:39:53PM -0400, Blu wrote:
> > 
> > 
> > ii  ntp-server                       4.2.0a+stable-9         Network Time Protocol: common server tools
> > ii  ntp-simple                       4.2.0a+stable-9         Network Time Protocol: daemon for simple systems
> 
> This doesn't make any sense to me.  /etc/init.d/ntp-server should
> have this in it (for start and restart):
>                 start-stop-daemon --start --quiet --oknodo --pidfile /var/run/ntpd.pid --startas /usr/sbin/ntpd -- -p /var/run/ntpd.pid -u $UGID
> 
> And that should work properly.  You're missing both the -p and
> -u.  The -u sets the user and group id, and since you don't have
> that you have a problem.  The missing -p is probably the reason
> why you might have several ones running.

Ok, I have downloaded ntp-server (with aptitude download) and then
extracted it with dpkg -X to a test directory. The files
/etc/init.d/ntp-server (the installed one) and the one comming with the
package are in fact different and the options required are missing. Here
is the diff output.

----------------------
# diff /etc/init.d/ntp-server test/ntp-server/etc/init.d/ntp-server 
1c1
< #! /bin/sh
---
> #!/bin/sh -e
3,4c3
< PATH=/sbin:/bin
< FLAGS="defaults 23"
---
> PATH=/sbin:/bin:/usr/bin
7a7,14
> RUNASUSER=ntp
> UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true
> 
> if [ -z "$UGID" ]; then
>   echo "User $RUNASUSER does not exist" >&2
>   exit 1
> fi
> 
11c18
<               start-stop-daemon --start --quiet --exec /usr/sbin/ntpd
---
>               start-stop-daemon --start --quiet --oknodo --pidfile /var/run/ntpd.pid --startas /usr/sbin/ntpd -- -p /var/run/ntpd.pid -u $UGID
16c23
<               start-stop-daemon --stop --quiet --exec /usr/sbin/ntpd
---
>               start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/ntpd.pid
17a25
>               rm -f /var/run/ntpd.pid
21c29
<               start-stop-daemon --stop --quiet --exec /usr/sbin/ntpd
---
>               start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/ntpd.pid
23c31
<               start-stop-daemon --start --quiet --exec /usr/sbin/ntpd
---
>               start-stop-daemon --start --quiet --oknodo --pidfile /var/run/ntpd.pid --startas /usr/sbin/ntpd -- -p /var/run/ntpd.pid -u $UGID
25a34,37
>       reload)
>               echo "Not supported, sorry. Use 'restart' or 'force-reload'." >&2
>               exit 1
>               ;;
27c39
<               echo "Usage: /etc/init.d/ntp-simple {start|stop|restart|force-reload}"
---
>               echo "Usage: /etc/init.d/ntp-server {start|stop|restart|force-reload}"
---------------------------------

I tried to install the downloaded deb of ntp-server with some debugging turned
on. The bug is still present. Here you have the output. Hope it is useful. If
you need some more debug just tell me. I am not really into deb package that
much as to interpret the following. The file /etc/init.d/ntp-server stays the
same.

ī---------------------------------
# dpkg -D20 -i ntp-server_1%3a4.2.0a+stable-9_i386.deb 
(Reading database ... 61935 files and directories currently installed.)
Preparing to replace ntp-server 1:4.2.0a+stable-9 (using ntp-server_1%3a4.2.0a+stable-9_i386.deb) ...
D000020: process_archive conffile `/etc/init.d/ntp-server' package=ntp-server same hash=ae4fc62f2dbcd5f702aa6b484fd7ad6e
D000020: process_archive conffile `/etc/logcheck/ignore.d.server/ntp-server' package=ntp-server same hash=77d6fc4664422944ceda8e097b6118ab
D000020: process_archive conffile `/etc/network/if-up.d/ntp-server' package=ntp-server same hash=3c9e505ecc02acd1d9554030a834a958
D000020: process_archive conffile `/etc/ntp.conf' package=ntp-server same hash=577b99550fd4f5b786ef7da3617ed692
D000020: process_archive conffile `/etc/cron.daily/ntp-server' package=ntp-server same hash=e51cbea9bc3637dd3fb829b0f862fc93
D000020: process_archive conffile `/etc/cron.weekly/ntp-server' package=ntp-server same hash=4ab60269a1940b66e991941e344841b2
Stopping NTP server: ntpd.
Unpacking replacement ntp-server ...
D000020: conffderef in=`etc/init.d/ntp-server' result=`/etc/init.d/ntp-server'
D000020: tarobject fnnf_new_conff deref=`etc/init.d/ntp-server'
D000020: conffderef in=`etc/logcheck/ignore.d.server/ntp-server' result=`/etc/logcheck/ignore.d.server/ntp-server'
D000020: tarobject fnnf_new_conff deref=`etc/logcheck/ignore.d.server/ntp-server'
D000020: conffderef in=`etc/network/if-up.d/ntp-server' result=`/etc/network/if-up.d/ntp-server'
D000020: tarobject fnnf_new_conff deref=`etc/network/if-up.d/ntp-server'
D000020: conffderef in=`etc/ntp.conf' result=`/etc/ntp.conf'
D000020: tarobject fnnf_new_conff deref=`etc/ntp.conf'
D000020: conffderef in=`etc/cron.daily/ntp-server' result=`/etc/cron.daily/ntp-server'
D000020: tarobject fnnf_new_conff deref=`etc/cron.daily/ntp-server'
D000020: conffderef in=`etc/cron.weekly/ntp-server' result=`/etc/cron.weekly/ntp-server'
D000020: tarobject fnnf_new_conff deref=`etc/cron.weekly/ntp-server'
Setting up ntp-server (4.2.0a+stable-9) ...
D000020: conffderef in=`/etc/init.d/ntp-server' result=`/etc/init.d/ntp-server'
D000020: deferred_configure `/etc/init.d/ntp-server' (= `/etc/init.d/ntp-server') useredited=1 distedited=0 what=2
D000020: conffderef in=`/etc/logcheck/ignore.d.server/ntp-server' result=`/etc/logcheck/ignore.d.server/ntp-server'
D000020: deferred_configure `/etc/logcheck/ignore.d.server/ntp-server' (= `/etc/logcheck/ignore.d.server/ntp-server') useredited=-1 distedited=-1 what=2
D000020: conffderef in=`/etc/network/if-up.d/ntp-server' result=`/etc/network/if-up.d/ntp-server'
D000020: deferred_configure `/etc/network/if-up.d/ntp-server' (= `/etc/network/if-up.d/ntp-server') useredited=-1 distedited=-1 what=2
D000020: conffderef in=`/etc/ntp.conf' result=`/etc/ntp.conf'
D000020: deferred_configure `/etc/ntp.conf' (= `/etc/ntp.conf') useredited=1 distedited=0 what=2
D000020: conffderef in=`/etc/cron.daily/ntp-server' result=`/etc/cron.daily/ntp-server'
D000020: deferred_configure `/etc/cron.daily/ntp-server' (= `/etc/cron.daily/ntp-server') useredited=-1 distedited=-1 what=2
D000020: conffderef in=`/etc/cron.weekly/ntp-server' result=`/etc/cron.weekly/ntp-server'
D000020: deferred_configure `/etc/cron.weekly/ntp-server' (= `/etc/cron.weekly/ntp-server') useredited=-1 distedited=-1 what=2
Starting NTP server: ntpd.
--------------------------------------

As a side note, the problem with more than one daemon running sumultaneously
seems to have vanished. I noticed too that ntp-simple doesn't require
ntp-server, it only recommends it, so I guess when I updated, it only updated
ntp-simple in the first place and only updated ntp-server later when I did it
explicitly. Iam not pulling recommends automaticaly.

Hope it helps and let me know if you need more data.

-- 
Blu Corater.




More information about the pkg-ntp-maintainers mailing list