[PATCH] hoist definition of cmd to remove one more hard-coded "dc-register-image"

Jim Meyering jim at meyering.net
Wed Sep 29 17:13:27 UTC 2010


Pete Zaitcev wrote:
> On Mon, 27 Sep 2010 13:06:19 +0200
> Jim Meyering <jim at meyering.net> wrote:
>
>> +++ b/backend.c
>> +	const char *cmd = "dc-register-image";
>>  	if (pid == 0) {
>> -		const char *cmd = "dc-register-image";
>>  		(void)dup2(organ[1],STDOUT_FILENO);
>>  		(void)dup2(organ[1],STDERR_FILENO);
>>  		execvp(cmd, (char* const*)argv);
>
> Apropos this, while Jim's patch is not making it any worse, I do not
> understand how we were expecting dc-register-image to get executed
> without a path.

Using an absolute name there (or ensuring PATH is adequate) won't be hard.
However, with key/secret pairs on two command lines, won't we want to
adjust so that api_key and api_secret cannot appear in ps listings?

I noticed this in that script:

  export JAVA_HOME=/usr

Leaving the java dependency aside for a moment...
Are the ec2* tools it uses "free" enough?
I see the ec2-api-tools.noarch package is in rpmfusion-nonfree.

I suspect we'll be motivated to use another ec2 interface.


More information about the iwhd-devel mailing list