On Fri, May 08, 2015 at 10:19:25PM +0200, Alexander Dreweke wrote:
> Package: openvpn
> Version: 2.3.4-5
> Severity: normal
> 
> Dear Maintainer,
> 
> I'm using the daemon option in my openvpn settings, while investigating
> an unrelated openvpn problem I've noticed the following error messages
> in the daemon.log:
> 
> May  8 21:59:53 foo ovpn-test.example.net[11554]: WARNING: Multiple --daemon 
> directives specified, ignoring --daemon test. (Note that initscripts 
> sometimes add their own --daemon directive.)
> 
> When I investigated the init script I found most/(all ?) if-conditions
> using "grep -q" are inverted. From the grep man-page:
> 
> The exit status is 0 if selected lines are found, and 1 if not found.
> 
> And 0 is evaluated to false, which leads to the wrong conditional branch
> evaluation and therefore to the duplicate daemon directive (ignoring the
> daemon option in the user configuration). Same holds true for the status
> file.
> 

You sure?

    if grep -q '^[       ]*daemon' $CONFIG_DIR/$NAME.conf ; then
      # daemon already given in config file
      DAEMONARG=
    else
      # need to daemonize
      DAEMONARG="--daemon ovpn-$NAME"
    fi

Since when "0 is evaluated to false" in a shell script?

-- 
Alberto Gonzalez Iniesta    | Formación, consultoría y soporte técnico
mailto/sip: a...@inittab.org | en GNU/Linux y software libre
Encrypted mail preferred    | http://inittab.com

Key fingerprint = 5347 CBD8 3E30 A9EB 4D7D  4BF2 009B 3375 6B9A AA55


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to