On Mon, Apr 02, 2007 at 03:41:12PM +0200, Josselin Mouette wrote:
> Package: openntpd
> Version: 3.9p1-3
> Severity: serious
> 
> When the default (Debian) NTP servers are not reachable, the openntpd 
> package fails to install:
> Dépaquetage de openntpd (à partir de .../openntpd_3.9p1-3_i386.deb) ...
> Paramétrage de openntpd (3.9p1-3) ...
> Starting openntpd: invoke-rc.d: initscript openntpd, action "start" failed.
> dpkg : erreur de traitement de openntpd (--configure) :
>  le sous-processus post-installation script a retourné une erreur de sortie 
> d'état 1
> Des erreurs ont été rencontrées pendant l'exécution :
>  openntpd
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> Modifying /etc/openntpd/ntpd.conf to provide working NTP servers in the 
> machine's environment is enough to allow the package to install, but it 
> must install in all cases, even when on a private network.

So, I looked at the reason why openntpd could exit with a return code
of 1:
- parse_config() failed
- Not running as root
- user ntpd doesn't exist
- You give at an invalid option
- strdup() failed
- Some other fatal error, but it should be logged to syslog

parse_config() returns an error on parse/grammar errors, which the
default config shouldn't have.  It returns a nice error message in that
case like:
Starting openntpd: /etc/openntpd/ntpd.conf:19: syntax error

It doesn't complain about a host it can't resolve or something, that's
not a grammar error.

As far as I can see it should always log something to either stderr or
syslog in case of a failure.

An other reason the init script could return an error is that
start-stop-daemon itself returned 1.  From start-stop-daemon's manpage:
       With --start, start-stop-daemon checks for the existence of a specified
       process.  If such a process exists, start-stop-daemon does nothing, and
       exits with error status 1 (0 if --oknodo is specified).
[...]
       Note:  unless --pidfile is specified, start-stop-daemon behaves similar
       to killall(1).  start-stop-daemon will scan the process  table looking
       for  any  processes  which  match the process name, uid, and/or gid (if
       specified). Any matching process will prevent --start from starting the
       daemon.

This looks like somehow start-stop-daemon thinks that daemon was already
running.  I can't see any other way you should get this error.  It's
also the behaviour I get when testing it.

But I really have no idea why you got that error.


Kurt


Reply via email to