There is a shell script that is defined for the qemu session that is
defined in the rootstock main shell script. This classifies the problem
as a shell script running from inside another shell script.
Normally exporting a variable in the outer shell script would work for
any subprocesses run by the shell. But this isn't the normal case.
qemu won't inherit exported variables (which makes sense).
The inner shell script starts around line 798 and looks like this:
cat > $BUILDDIR/installer <<EOF
#!/bin/bash
Put these lines next to the exports that immediately follow:
if [ "${http_proxy}" != "" ]; then
export http_proxy=${http_proxy}
fi
The http_proxy variable will be deref'd by the outer shell script. So
when it runs in the inner shell script it becomes:
If http_proxy is unset in the outer scripts, environment, it remains
unset in the inner script.
--Rob
On Mon, 2010-03-01 at 15:43 +0000, david.luca wrote:
> I'm sorry, it's not very clear for me, how can I tell the proxy to qemu
> image, which shell variable? I tried exporting in rootstock script
> http_proxy=http://<proxyserver:port>, but still doesn't work... Thanks,
> David.
>
David,
Apologies. I'm doing this from memory.
There is a shell script that is defined for the qemu session that is
defined in the rootstock main shell script. This classifies the problem
as a shell script running from inside another shell script.
Normally exporting a variable in the outer shell script would work for
any subprocesses run by the shell. But this isn't the normal case.
qemu won't inherit exported variables (which makes sense).
The inner shell script starts around line 798 and looks like this:
cat > $BUILDDIR/installer <<EOF
#!/bin/bash
Put these lines next to the exports that immediately follow:
if [ "${http_proxy}" != "" ]; then ${http_ proxy}
export http_proxy=
fi
The http_proxy variable will be deref'd by the outer shell script. So
when it runs in the inner shell script it becomes:
if [ "http:// proxy:80" != "" ]; then proxy:80
export http_proxy=http://
fi
If http_proxy is unset in the outer scripts, environment, it remains
unset in the inner script.
--Rob
On Mon, 2010-03-01 at 15:43 +0000, david.luca wrote:
> I'm sorry, it's not very clear for me, how can I tell the proxy to qemu
> image, which shell variable? I tried exporting in rootstock script
> http_proxy=http://<proxyserver:port>, but still doesn't work... Thanks,
> David.
>