[vserver] exec export DEBIAN_FRONTEND=noninteractive

From: Eugen Leitl <eugen_at_leitl.org>
Date: Sat 10 Apr 2010 - 11:10:11 BST
Message-ID: <20100410101011.GR1964@leitl.org>

I'm processing /24 worth of vservers at a time via a noninteractive script,
and unfortunately can't make exec export DEBIAN_FRONTEND=noninteractive
stick. How are you doing it?

The script I use, called as e.g. ./modall.sh 1 254

#!/bin/sh
set -x
IPstart=$1
IPend=$2

function process () {
        vserver v${1} restart
        vserver v${1} exec apt-get update
        vserver v${1} exec export DEBIAN_FRONTEND=noninteractive
        vserver v${1} exec apt-get -y --force-yes install locales nginx postfix
        vserver v${1} hashify
}

for i in `seq $IPstart $IPend`;
do
        process $i
done

The error I'm getting is vcontext: execvp("export"): No such file or directory
Using just DEBIAN_FRONTEND=noninteractive is no good either, and there's
no way to execute multiple commands in one line with vserver exec

Do I have to build a script in each vserver and call it? If yes, can someone
post a recipe for that? Thanks.

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