FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-01-2010, 02:03 PM
Malte Forkel
 
Default Argument to start_daemon, use of --

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


--
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
 
Old 08-01-2010, 02:26 PM
Jordon Bedwell
 
Default 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

Archive: 4C55841C.6090704@envygeeks.com">http://lists.debian.org/4C55841C.6090704@envygeeks.com
 
Old 08-02-2010, 08:36 AM
Malte Forkel
 
Default Argument to start_daemon, use of --

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
 
Old 08-02-2010, 11:17 AM
Jordon Bedwell
 
Default 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

Archive: 4C56A94A.9060702@envygeeks.com">http://lists.debian.org/4C56A94A.9060702@envygeeks.com
 
Old 08-02-2010, 03:45 PM
Bob Proulx
 
Default Argument to start_daemon, use of --

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?

It was a convention and is now a standard.

http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02

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
 
Old 08-05-2010, 11:53 AM
Malte Forkel
 
Default 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
 

Thread Tools




All times are GMT. The time now is 10:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org