The example init script init.d.lsb.ex provided by dh-make 0.46 contains
this call to start_daemon:
start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
This always passes "--" as first argument to my daemon. Wouldn't
start_daemon -p $PIDFILE -- $DAEMON $DAEMON_OPTS
be the proper call?
I haven't found a reference to "--" in the LSB init function
documentation, but the implementation of start_daemon in
/lib/lsb/init-function (from lsb-base) handles "--" explicitly. The use
of "--" is documented in bash(1) though. Is this a convention? What
status has it?
Thanks,
Malte
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i33ur9$552$1@dough.gmane.org">http://lists.debian.org/i33ur9$552$1@dough.gmane.org
08-01-2010, 02:26 PM
Jordon Bedwell
Argument to start_daemon, use of --
On 8/1/2010 9:03 AM, Malte Forkel wrote:
Hi,
The example init script init.d.lsb.ex provided by dh-make 0.46 contains
this call to start_daemon:
start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
This always passes "--" as first argument to my daemon. Wouldn't
start_daemon -p $PIDFILE -- $DAEMON $DAEMON_OPTS
be the proper call?
I haven't found a reference to "--" in the LSB init function
documentation, but the implementation of start_daemon in
/lib/lsb/init-function (from lsb-base) handles "--" explicitly. The use
of "--" is documented in bash(1) though. Is this a convention? What
status has it?
Thanks,
Malte
According to the man page it should be:
start_daemon -p $PIDFILE $EXECUTABLE $EXECTUABLE_OPTS
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Am 01.08.2010 16:26, schrieb Jordon Bedwell:
> On 8/1/2010 9:03 AM, Malte Forkel wrote:
>> Hi,
>>
>> The example init script init.d.lsb.ex provided by dh-make 0.46 contains
>> this call to start_daemon:
>>
>> start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
>>
>> This always passes "--" as first argument to my daemon. Wouldn't
>>
>> start_daemon -p $PIDFILE -- $DAEMON $DAEMON_OPTS
>>
>> be the proper call?
>>
>> I haven't found a reference to "--" in the LSB init function
>> documentation, but the implementation of start_daemon in
>> /lib/lsb/init-function (from lsb-base) handles "--" explicitly. The use
>> of "--" is documented in bash(1) though. Is this a convention? What
>> status has it?
>>
>> Thanks,
>> Malte
>>
>>
>
> According to the man page it should be:
> start_daemon -p $PIDFILE $EXECUTABLE $EXECTUABLE_OPTS
>
>
So its a bug that I should report?
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i3602p$les$1@dough.gmane.org">http://lists.debian.org/i3602p$les$1@dough.gmane.org
08-02-2010, 11:17 AM
Jordon Bedwell
Argument to start_daemon, use of --
On 8/2/2010 3:36 AM, Malte Forkel wrote:
So its a bug that I should report?
If the -- is in a Debian specific script from a maintainer I would, and
post the proof that -- is being passed to the executable before _OPTS
and ask them if this is intended and then explain to them how it breaks
whatever it breaks and point to the man page.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Malte Forkel wrote:
> The example init script init.d.lsb.ex provided by dh-make 0.46 contains
> this call to start_daemon:
> start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
> This always passes "--" as first argument to my daemon. Wouldn't
> start_daemon -p $PIDFILE -- $DAEMON $DAEMON_OPTS
> be the proper call?
It does seem that way to me too.
> I haven't found a reference to "--" in the LSB init function
> documentation, but the implementation of start_daemon in
> /lib/lsb/init-function (from lsb-base) handles "--" explicitly. The use
> of "--" is documented in bash(1) though. Is this a convention? What
> status has it?
Guideline 10:
The argument -- should be accepted as a delimiter indicating the
end of options. Any following arguments should be treated as
operands, even if they begin with the '-' character. The --
argument should not be used as an option or as an operand.
It marks the end of option argument processing. Subsequent arguments
should not be treated as options even if they start with a dash. This
enables processing of files that begin with a dash. Like this for
example:
$ touch ./--help
$ rm -f -- --help
Bob
08-05-2010, 11:53 AM
Malte Forkel
Argument to start_daemon, use of --
Am 01.08.2010 16:03, schrieb Malte Forkel:
>
> The example init script init.d.lsb.ex provided by dh-make 0.46 contains
> this call to start_daemon:
>
> start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
>
> This always passes "--" as first argument to my daemon. Wouldn't
>
> start_daemon -p $PIDFILE -- $DAEMON $DAEMON_OPTS
>
> be the proper call?
>
Thanks for all of your input.
I have filed a bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591747 (#591747 -
/usr/share/debhelper/dh_make/debian/init.d.lsb.ex: init.d.lsb.ex passes
-- as first argument to daemon - Debian Bug report logs)
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i3e8ok$utb$1@dough.gmane.org">http://lists.debian.org/i3e8ok$utb$1@dough.gmane.org