[PATCH] usage stanza

Lukáš Nykrýn lnykryn at redhat.com
Thu Feb 16 09:28:51 UTC 2012


Petr Lautrbach píše v St 18. 01. 2012 v 15:53 +0100:
> On 12/12/2011 04:05 PM, James Hunt wrote:
> > Hi Petr,
> >
> > On 16/11/11 13:39, Petr Lautrbach wrote:
> >> Hello,
> >>
> >> attached patch is implementation of suggested functionality including
> >> "initctl usage JOB" command.
> >>
> >
> 
> The patch [1] is rebased for 1.4 now.
> 
> > There seems to be a problem here. I haven't debugged it but it's not working as documented (adding a
> > 'usage' and running 'status' doesn't display the usage on my system). Also:
> 
> I will need more information. Works for me here:
> 
> # cat /etc/init/example-job.conf
> instance $ID
> 
> usage "example-job ID=X - where X is id"
> 
> respawn
> exec sh -c "echo $ID >> /tmp/example-job.log; sleep 3600"
> 
> # initctl status example-job
> initctl: Unknown parameter: ID
> Usage: example-job ID=X - where X is id
> 
> # initctl usage example-job
> Usage: example-job ID=X - where X is id
> 
> # initctl start example-job
> initctl: Unknown parameter: ID
> Usage: example-job ID=X - where X is id
> 
> # initctl start example-job ID=1
> example-job (1) start/running, process 2069
> 
> # initctl status example-job
> initctl: Unknown parameter: ID
> Usage: example-job ID=X - where X is id
> 
> # initctl status example-job ID=1
> example-job (1) start/running, process 2069
> 
> # initctl stop example-job
> initctl: Unknown parameter: ID
> Usage: example-job ID=X - where X is id
> 
> # initctl stop example-job ID=1
> example-job stop/waiting
> 
> 
> > * init/tests/test_parse_job.c: main() is missing a call to test_stanza_usage().
> >    Note that if you add that call, test_stanza_usage() fails.
> >
> 
> test_parse_job.c fixed
> 
> 
> [1] http://plautrba.fedorapeople.org/upstart/upstart-1.4-usage.patch
> 
> Regards,
> 
> Petr

Hello,
I want to ask if this patch is considered to be included in next upstart
release or if it needs some alteration.

Regards,
Lukas
 





More information about the upstart-devel mailing list