Ticket #181 (closed defect: duplicate)

Opened 5 months ago

Last modified 5 months ago

Malformed shell command in /etc/init.d/iguanaIR script

Reported by: jgombos Owned by: jdunn
Priority: low Component: Software
Version: Severity: minor
Keywords: Cc:

Description

There is a problem with how this "START" line is composed in the startup script. It is written as:

START="daemon --user=iguanair $IGPATH $IGUANAIR_OPTIONS -l $LOGFILE"

in a typical case, this expands to:

START="daemon --user=iguanair /usr/bin/igdaemon --log-level=0 --send-timeout=1000 --receive-timeout=1000 -l /var/log/iguanaIR.log"

The problem is that options intended for the igdaemon command ($IGUANAIR_OPTIONS) are being passed to what I'll call the daemon handler. When run on the CLI, this is the result:

$ daemon --user=iguanair /usr/bin/igdaemon --log-level=0 --send-timeout=1000 --receive-timeout=1000 -l /var/log/iguanaIR.log daemon: unrecognized option `--log-level=1' usage: daemon [options] [cmd arg...]

The solution - simply embed escaped quotes:

START="daemon --user=iguanair \"$IGPATH $IGUANAIR_OPTIONS -l $LOGFILE\""

This problem will only appear in cases where the script runs and detects a lockfile.

Change History

Changed 5 months ago by bluey

  • status changed from new to closed
  • resolution set to duplicate

I think your daemon program, on debian etch, is different from daemon on fedora systems. On fedora systems, we do not have this problem. So this problem is really the same as #178 and I will close this ticket.

Note: See TracTickets for help on using tickets.