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

2006-07-18 Thread Marco d'Itri
On Jul 04, Kurt Roeckx [EMAIL PROTECTED] wrote:

 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

I had the same problem (ntpd running as root instead of ntp) after an
upgrade and my /etc/init.d/ntp-server had these lines.
Just restarting the daemon fixed this.

-- 
ciao,
Marco


signature.asc
Description: Digital signature


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

2006-07-18 Thread Marco d'Itri
On Jul 18, Kurt Roeckx [EMAIL PROTECTED] wrote:

  I had the same problem (ntpd running as root instead of ntp) after an
  upgrade and my /etc/init.d/ntp-server had these lines.
  Just restarting the daemon fixed this.
 An upgrade from what version to what version is that?
From 1:4.2.0a+bk20040620-1 to 1:4.2.0a+stable-9.

-- 
ciao,
Marco


signature.asc
Description: Digital signature


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

2006-07-18 Thread Kurt Roeckx
On Tue, Jul 18, 2006 at 02:11:26PM +0200, Marco d'Itri wrote:
 On Jul 04, Kurt Roeckx [EMAIL PROTECTED] wrote:
 
  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
 
 I had the same problem (ntpd running as root instead of ntp) after an
 upgrade and my /etc/init.d/ntp-server had these lines.
 Just restarting the daemon fixed this.

An upgrade from what version to what version is that?


Kurt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2006-07-04 Thread Kurt Roeckx
On Mon, Jul 03, 2006 at 09:39:53PM -0400, Blu wrote:
 On Mon, Jul 03, 2006 at 07:53:11AM +0200, Kurt Roeckx wrote:
  On Sun, Jul 02, 2006 at 08:35:46PM -0400, Blu wrote:
  
  invoke-rc.d ntp-server restart should be the proper way to start
  it.
  
  What version of the ntp-server package do you have installed?
 
 
 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.


Kurt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2006-07-04 Thread Blu
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) ...
D20: process_archive conffile `/etc/init.d/ntp-server' package=ntp-server 
same hash=ae4fc62f2dbcd5f702aa6b484fd7ad6e
D20: process_archive conffile `/etc/logcheck/ignore.d.server/ntp-server' 
package=ntp-server same hash=77d6fc4664422944ceda8e097b6118ab
D20: process_archive conffile `/etc/network/if-up.d/ntp-server' 
package=ntp-server same hash=3c9e505ecc02acd1d9554030a834a958
D20: process_archive conffile `/etc/ntp.conf' package=ntp-server same 
hash=577b99550fd4f5b786ef7da3617ed692
D20: process_archive conffile `/etc/cron.daily/ntp-server' 
package=ntp-server same hash=e51cbea9bc3637dd3fb829b0f862fc93
D20: process_archive conffile `/etc/cron.weekly/ntp-server' 
package=ntp-server same hash=4ab60269a1940b66e991941e344841b2
Stopping NTP server: ntpd.
Unpacking replacement ntp-server ...
D20: conffderef in=`etc/init.d/ntp-server' result=`/etc/init.d/ntp-server'
D20: tarobject fnnf_new_conff deref=`etc/init.d/ntp-server'
D20: conffderef in=`etc/logcheck/ignore.d.server/ntp-server' 
result=`/etc/logcheck/ignore.d.server/ntp-server'
D20: tarobject fnnf_new_conff 
deref=`etc/logcheck/ignore.d.server/ntp-server'
D20: conffderef in=`etc/network/if-up.d/ntp-server' 
result=`/etc/network/if-up.d/ntp-server'
D20: tarobject fnnf_new_conff deref=`etc/network/if-up.d/ntp-server'
D20: conffderef in=`etc/ntp.conf' result=`/etc/ntp.conf'
D20: tarobject fnnf_new_conff deref=`etc/ntp.conf'
D20: conffderef in=`etc/cron.daily/ntp-server' 
result=`/etc/cron.daily/ntp-server'
D20: tarobject fnnf_new_conff deref=`etc/cron.daily/ntp-server'
D20: conffderef in=`etc/cron.weekly/ntp-server' 
result=`/etc/cron.weekly/ntp-server'
D20: tarobject