Re: [vserver] exec export DEBIAN_FRONTEND=noninteractive

From: Eugen Leitl <eugen_at_leitl.org>
Date: Sat 10 Apr 2010 - 14:00:35 BST
Message-ID: <20100410130035.GS1964@leitl.org>

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).
>
> So,
>
> - 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
> also.

That was exactly what I was looking for. Script works perfectly now.
Thanks everybody.

-- 
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 F6BE
Received on Sat Apr 10 14:00:52 2010
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 10 Apr 2010 - 14:00:54 BST by hypermail 2.1.8