agent-no-start with or without arg?

John Mazzitelli mazz at redhat.com
Wed Jun 12 00:35:47 UTC 2013


I added the "--agent-no-start" option to rhqctl a few days ago. It takes true or false as an argument (the default is false).

I did this because I tend to prefer options whose two boolean values can be specified explicitly (true or false). Without accepting a value, there is no way to explicitly say you want the agent to start (the only way would be to not specify --agent-no-start).

So we have: 

--agent-no-start=false means to start the agent after being installed (this is the default)
--agent-no-start=true means don't start.

However, I sense this might be confusing.

Should I just make this a non-arg option? So to not have the agent start, you specify --agent-no-start. To have the agent start (which is the default behavior) you don't specify it at all.

We are using org.apache.commons.cli.Options, I don't think you can tell it to have an optional argument (like you can with gnu getopt). If you CAN do this, let me know.

What say you? If we want to change it, I want to do so now before release.


More information about the rhq-devel mailing list