Ticket #181 (closed defect: duplicate)
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.
