Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shellcommands - howto alter environment variables?

1 view
Skip to first unread message

Pieter Thysebaert

unread,
Oct 10, 2003, 6:39:43 AM10/10/03
to
Hello,

I'm using Debian Woody and use Fully Automatic Install to install some test
machines.

I want to install proftpd on some of these machines, so the FAI-cfengine
Shellcommands section contains something like

FTPSERVER::
"DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get --yes -f install
proftpd"


However, this syntax is not accepted it seems (cfengine nags about wanting a
full path-to-executable at the start of the command line)

How can I work around this to achieve my goal, which is to install proftpd
without going into the debconf configuration dialog ?


Pieter

Adrian Phillips

unread,
Oct 10, 2003, 7:23:28 AM10/10/03
to Pieter Thysebaert, help-c...@gnu.org
>>>>> "Pieter" == Pieter Thysebaert <pieter.t...@rug.ac.be> writes:

Pieter> I want to install proftpd on some of these machines, so
Pieter> the FAI-cfengine Shellcommands section contains something
Pieter> like

Pieter> FTPSERVER:: "DEBIAN_FRONTEND=noninteractive
Pieter> /usr/bin/apt-get --yes -f install proftpd"

Pieter> However, this syntax is not accepted it seems (cfengine
Pieter> nags about wanting a full path-to-executable at the start
Pieter> of the command line)

"/bin/sh -c 'ENV=value command'"

Sincerely,

Adrian Phillips

--
Who really wrote the works of William Shakespeare ?
http://www.pbs.org/wgbh/pages/frontline/shakespeare/


Thomas Glanzmann

unread,
Oct 10, 2003, 8:27:31 AM10/10/03
to help
Hi,

* Pieter Thysebaert <pieter.t...@rug.ac.be> [031010 13:17]:


> I'm using Debian Woody and use Fully Automatic Install to install some test
> machines.

same for us.

> How can I work around this to achieve my goal, which is to install proftpd
> without going into the debconf configuration dialog ?

we're using the attached update shell script and the following statement
to start it via cfagaent:

/usr/bin/dpkg --set-selections < /var/cfengine/inputs/selections
/usr/bin/apt-get update
/usr/bin/yes '' | /usr/bin/apt-get --force-yes dselect-upgrade
/usr/bin/yes '' | /usr/bin/apt-get --force-yes upgrade
/usr/bin/apt-get clean
yes '' | dpkg --configure -a

shellcommands:

"/var/cfengine/inputs/update"

This helps to make debian less chatty:

editfiles:
linux::
{ /etc/dpkg/dpkg.cfg
AppendIfNoSuchLine 'force-confold'
AppendIfNoSuchLine 'force-confdef'
}

(ROOTmephisto) [/var/cfengine/distributed/linux/etc/apt] cat apt.conf
// This file is used in the chroot environment from install_packages
// (called by rcS_fai)
// $Header: /var/cfengine/distributed/etc/apt/RCS/apt.conf,v 1.2 2002/03/30 21:08:05 sithglan Exp $

// Options for apt-get for FAI
APT
{
// Options for apt-get
Get
{
Assume-Yes "true";
Fix-Missing "yes";
Show-Upgraded "yes";
Purge "true"; // really purge ! Also removes config files
List-Cleanup "true";
ReInstall "false";
};
};

DPkg
{
Options {"--abort-after=4711";} // a magic number in cologne
};

DPkg::Pre-Install-Pkgs {
"dpkg-preconfigure --apt --frontend=noninteractive";
};

Greetings,
Thomas


0 new messages