[jboss-as7-dev] Couple of minor changes to jboss-admin.sh script

Alexey Loubyansky alexey.loubyansky at redhat.com
Fri May 20 11:06:33 EDT 2011


Ok, so we can divide commands by local and remote. cd, ls, etc would 
belong to local. And those that translate to operations would fall into 
remote.
Connect is actually not clear in this sense since it does connect to a 
possibly remote server and verifies whether it's standalone or domain by 
sending an operation request. The fact that the message is logged not 
from the command handler is an implementation detail (it should be 
logged from the handler).
So, ok, we could have an option to log only "remote" commands.

About interactive and non-interactive mode. That's kind of what I meant. 
I.e. in non-interactive mode (i.e. with the presence of 'command', 
'commands' or 'file') we could log only the commands specified in one of 
these arguments. Would this be enough?

Having "quiet" mode meaning not to log "connected/closed" seems like too 
much to me.

On 05/20/2011 04:43 PM, Scott Stark wrote:
> But the connected/closed are output from the
> CommandLineMain.CommandContextImpl implementation of
> connectController/disconnectController. It is not something returned by
> the server. In a scripting environment command, commands and file will
> be used to pass in commands. In general, if the command shell is not
> interactive, the output should be targeted toward parsing. There may
> need to be other changes for the multiple commands usecases, but for
> this issue I'm just wanting to simplify the single command usecase.
>
> Having the env display from a command is a good idea as it simplifies
> the scripts.
>
> Hard quoting is using single quotes to prevent the shell from expanding
> variable references at a given point. It is better if one does not have
> to jump through extra hoops to get arguments passed into jboss-admin.sh
> to show up correctly in the CommandLineMain.main.
>
> On 5/19/11 2:30 AM, Alexey Loubyansky wrote:
>> If we want to introduce --quite then it has be defined better what's
>> logged in either mode and what's affected by it.
>>
>> The header isn't a problem. But "Connected..."/"Closed..." is an output
>> from a command, much like the one specified in --command.
>>
>> Perhaps, if --command is present then the log should contain only the
>> output produced by the command specified in --command.
>>
>> About quoting arguments, what is hard quoting? Currently, it's "$@" in
>> the script. I found that the following will work
>>
>> ./jboss-admin.sh --connect "command='ls deployment'"
>>
>> Alexey
>>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


More information about the jboss-as7-dev mailing list