[tryton-debian] Bug#803066: Bug#803066: tryton-server: problem with init scripts and "$DAEMON_OPTS" as set in /etc/default/tryton-server

Mathias Behrle mathiasb at m9s.biz
Mon Oct 26 18:13:08 UTC 2015


* Raphaël Hertzog: " [tryton-debian] Bug#803066: tryton-server: problem with
  init scripts and "$DAEMON_OPTS" as set in /etc/default/tryton-server" (Mon,
  26 Oct 2015 15:56:24 +0100):

Hi Raphaël,

> Source: tryton-server
> Version: 3.6.3-2
> Severity: important
> 
> I'm not quite sure how this happened but I just upgraded from 3.4 to 3.6
> on a wheezy server and /etc/default/tryton-server contained this:
> DAEMON_OPTS=" --config ${CONFIGFILE} --logconf ${LOGCONF} --cron"

I am quite surprised, because the line looks like that for a very long time.
The only change was the very recent addition of the --cron option for 3.4. I
also remember, that this space was needed quite some time ago, probably before
wheezy then.
 
> Note the initial space. With the init script provided in the package,
> this DAEMON_OPTS does not work at all... the init script and
> start-stop-daemon both ensure that the initial space is kept around.
> The init scripts does it due to having quotes around "$DAEMON_OPTS" in
> the start-stop-daemon invocation.
> 
> And the result is this failure:
> trytond: error: unrecognized arguments:  --config /etc/tryton/trytond.conf
> --logconf /etc/tryton/trytond_log.conf --cron
> 
> Worse than everything, you only see that error when you strace the init
> script because it's all hidden with the --background option.

Weird!
 
> This does not affect systemd users but all your backports for wheezy users
> are likely broken. I suggest gettind rid of the initial space and of the
> double quotes in the init script.

Could you please confirm, that I understand correctly, that the following diff
is meant to solve this problem:

diff --git a/debian/tryton-server.default b/debian/tryton-server.default
index 1ed770c..8f8cc54 100644
--- a/debian/tryton-server.default
+++ b/debian/tryton-server.default
@@ -19,4 +19,4 @@ LOGCONF="/etc/tryton/trytond_log.conf"
 
 # Additional options that are passed to the Daemon.
 # i.e. to increase the verbosity of the server log add -v
-DAEMON_OPTS=" --config ${CONFIGFILE} --logconf ${LOGCONF} --cron"
+DAEMON_OPTS="--config ${CONFIGFILE} --logconf ${LOGCONF} --cron"
diff --git a/debian/tryton-server.init b/debian/tryton-server.init
index dc9b259..3af53e8 100644
--- a/debian/tryton-server.init
+++ b/debian/tryton-server.init
@@ -55,7 +55,7 @@ do_start ()
 
        start-stop-daemon --start --quiet --pidfile "${PIDFILE}" \
                --chuid "${DAEMONUSER}" --background --make-pidfile \
-               --exec "${DAEMON}" -- "${DAEMON_OPTS}"
+               --exec "${DAEMON}" -- ${DAEMON_OPTS}
 }
 
 do_stop ()


Thanks,
Mathias

-- 

    Mathias Behrle
    PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.alioth.debian.org/pipermail/tryton-debian/attachments/20151026/bdba1c33/attachment-0001.sig>


More information about the tryton-debian mailing list