From: <ma...@rh...> - 2008-10-24 13:32:56
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [1841] send in all the passed in command line arguments to the _env script so the _env script can use them if it wants.</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1841</dd> <dt>Author</dt> <dd>mazz</dd> <dt>Date</dt> <dd>2008-10-24 08:32:47 -0500 (Fri, 24 Oct 2008)</dd> </dl> <h3>Log Message</h3> <pre>send in all the passed in command line arguments to the _env script so the _env script can use them if it wants. I hit this use case: I wanted to enforce --nonative to be passed into my agent. So, in _env.sh, I added "--nonative" to the CMDLINE_OPTS environment variable. But once I did that, I could never pass in additional command line arguments, because running "rhq-agent.sh --cleanconfig" would call the _env, override my cmdline options with --nonative and --cleanconfig would be lost. Because we now pass in $* / %*, I can append $* / %* to the end of my CMDLINE_OPTS in the env and all works.</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseagentsrcetcrhqagentbat">rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.bat</a></li> <li><a href="#rhqtrunkmodulesenterpriseagentsrcetcrhqagentsh">rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.sh</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseagentsrcetcrhqagentbat"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.bat (1840 => 1841)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.bat 2008-10-24 08:48:17 UTC (rev 1840) +++ rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.bat 2008-10-24 13:32:47 UTC (rev 1841) </span><span class="lines">@@ -22,7 +22,7 @@ </span><span class="cx"> setlocal if exist rhq-agent-env.bat echo Loading script environment from rhq-agent-env.bat... </span><span class="rem">-if exist rhq-agent-env.bat call rhq-agent-env.bat </span><span class="add">+if exist rhq-agent-env.bat call rhq-agent-env.bat %* </span><span class="cx"> if "%1"=="_SETENV_ONLY" ( set _SETENV_ONLY=true </span></pre></div> <a id="rhqtrunkmodulesenterpriseagentsrcetcrhqagentsh"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.sh (1840 => 1841)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.sh 2008-10-24 08:48:17 UTC (rev 1840) +++ rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent.sh 2008-10-24 13:32:47 UTC (rev 1841) </span><span class="lines">@@ -20,7 +20,7 @@ </span><span class="cx"> if [ -f "rhq-agent-env.sh" ]; then echo "Loading script environment from rhq-agent-env.sh..." </span><span class="rem">- . ./rhq-agent-env.sh </span><span class="add">+ . ./rhq-agent-env.sh $* </span><span class="cx"> fi # ---------------------------------------------------------------------- </span> </pre> </div> </div> </body> </html> |