On Sat, Apr 10, 2010 at 01:13:27PM +0200, Mathieu Goessens wrote:
> To complete what Ghislain wrote:
> When you call "vserver $vs exec something" it launch a shell witch is
> destructed after the command finishs. And, so the vars you set in are losts.
I was trying to get the variable set and the command executed
in the same shell.
> I gess that the export don't work for the same reason that
> "chroot /foo export" do'nt: it bypass the shell calling (and so export
> is not reconized as a valid command as it is a shell build-in).
> - a script should works
I realize that. That was something I'd rather avoid.
> - And "vserver $vs exec sh -c 'export FOO=bar; apt-get foobar;'" should
That was exactly what I was looking for. Script works perfectly now.
-- Eugen* Leitl leitl http://leitl.org ______________________________________________________________ ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org 8B29F6BE: 099D 78BA 2FD3 B014 B08A 7779 75B0 2443 8B29 F6BEReceived on Sat Apr 10 14:00:52 2010