[PATCH] usage stanza
Petr Lautrbach
plautrba at redhat.com
Wed Jan 18 14:53:24 UTC 2012
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
--
Petr Lautrbach, Red Hat, Inc.
http://cz.redhat.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: upstart-1.4-usage.patch
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20120118/af547e9e/attachment.ksh>
More information about the upstart-devel
mailing list