Your message dated Fri, 14 Sep 2012 18:39:26 +0200
with message-id <[email protected]>
and subject line Re: Bug#687622: /sbin/start-stop-daemon: start-stop-daemon 
breaks options containing whitespaces
has caused the Debian Bug report #687622,
regarding /sbin/start-stop-daemon: start-stop-daemon breaks options containing 
whitespaces
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
687622: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687622
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpkg
Version: 1.15.8.12
Severity: normal
File: /sbin/start-stop-daemon

When specifying arguments with whitespace in /etc/default/foo,
start-stop-daemon will break these when passing them to the daemon:

/etc/default/foo

        ARGS="-c 'bar quux'"

/etc/init.d/foo

        start-stop-daemon --start --quiet --exec $DAEMON -- $ARGS

The daemon will then parse it's options as:

        op=/c/
        optarg=/'bar /

(slashes added to mark begining and end of text)

The only workaround I found so far is:

/etc/default/foo

        ARGS="-a -b"
        C="bar quux"

/etc/init.d/foo

        [ -n "$C" ] && ARGS="$ARGS -c"
        start-stop-daemon --start --quiet --exec $DAEMON -- $ARGS "$C"

Regards

        Stefan

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-xen-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg depends on:
ii  coreutils               8.5-1            GNU core utilities
ii  libbz2-1.0              1.0.5-6+squeeze1 high-quality block-sorting file co
ii  libc6                   2.11.3-3         Embedded GNU C Library: Shared lib
ii  libselinux1             2.0.96-1         SELinux runtime shared libraries
ii  xz-utils                5.0.0-2          XZ-format compression utilities
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt                    0.8.10.3+squeeze1 Advanced front-end for dpkg

-- no debconf information

--- End Message ---
--- Begin Message ---
On Fri, 2012-09-14 at 12:40:02 +0200, Stefan Voelkel wrote:
> Package: dpkg
> Version: 1.15.8.12
> Severity: normal
> File: /sbin/start-stop-daemon
> 
> When specifying arguments with whitespace in /etc/default/foo,
> start-stop-daemon will break these when passing them to the daemon:

Actually it's your shell who's breaking out those arguments where you
don't want. s-s-d just takes whatever it's been given and passes it
through to the daemon.

> The only workaround I found so far is:
> 
> /etc/default/foo
> 
>       ARGS="-a -b"
>       C="bar quux"
> 
> /etc/init.d/foo
> 
>       [ -n "$C" ] && ARGS="$ARGS -c"
>       start-stop-daemon --start --quiet --exec $DAEMON -- $ARGS "$C"

You could fix it with something like this for example:

  # start-stop-daemon --start --quiet --exec $DAEMON -- `eval echo $ARGS`

Closing as there's no bug here.

regards,
guillem

--- End Message ---

Reply via email to