Re: apt-get in scripts

2002-08-05 Thread Dale Amon
On Sun, Aug 04, 2002 at 11:50:42PM -0400, John Bazik wrote:
 We set priority=low and frontend=noninteractive and wrap apt-get
 in an expect script, and add the right answers for the packages
 that just won't shut up.  We've been doing this since before most
 packages were debconf'd.  For all debconf'd packages, you can
 set up a database of answers, see debconf(8) and debconf.conf(5).
 We've just started doing that - works nicely.
 
 John

I've managed to get part of the way there with a line like this in
a cfengine2 shellcomand section:

debian.Sun.Hr00.Min00_05::
   '/bin/bash -c DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -q 
dist-upgrade'

Although I'm actually *not* (yet at least) intending to do a full 
upgrade in practice. I've visions of losing a couple dozen machines
across the planet in the time it takes to say oh shit...

I'll have to try adding the other ENV var you mention. 
I'm already modifying my debconf config files to some 
extent, so more won't be hard. 

The remaining problems are the questions about whether
to replace existing config files or not. Perhaps the
priority low will shut that up???



Re: apt-get in scripts

2002-08-04 Thread John Bazik
On Thu, Aug 01, 2002 at 09:31:05PM +0100, Dale Amon wrote:
 What sort of solution do other use for running an apt-get
 from a script? I use cfengine and pre-prepared site configs,
 but there are some apps on which apt-get simply won't work
 because even -y won't force it to shut up and just default
 to something.
 
 Is there some way on a case by case basis to either feed
 it an answer or force it to use a blank or whatever, but
 only when you specifically tell it install this package
 and make something up if you need information. I'll handle
 it, trust me.

We set priority=low and frontend=noninteractive and wrap apt-get
in an expect script, and add the right answers for the packages
that just won't shut up.  We've been doing this since before most
packages were debconf'd.  For all debconf'd packages, you can
set up a database of answers, see debconf(8) and debconf.conf(5).
We've just started doing that - works nicely.

John



Re: apt-get in scripts

2002-08-03 Thread Andres Salomon
I've crontabbed `DEBIAN_FRONTEND=noninteractive apt-get -q
dist-upgrade`.  I've not yet had any problems w/ it; debconf questions
should use the default, and config files should not be overwritten.  Of
course, this is w/ stable; I wouldn't trust this w/ testing/unstable.


On Thu, Aug 01, 2002 at 09:31:05PM +0100, Dale Amon wrote:
 
 What sort of solution do other use for running an apt-get
 from a script? I use cfengine and pre-prepared site configs,
 but there are some apps on which apt-get simply won't work
 because even -y won't force it to shut up and just default
 to something.
 
 Is there some way on a case by case basis to either feed
 it an answer or force it to use a blank or whatever, but
 only when you specifically tell it install this package
 and make something up if you need information. I'll handle
 it, trust me.
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
 

-- 
Broad surveillance is a mark of bad security.
-- Bruce Schneier



Re: apt-get in scripts

2002-08-03 Thread Dale Amon
On Sat, Aug 03, 2002 at 07:17:43AM -0400, Andres Salomon wrote:
 I've crontabbed `DEBIAN_FRONTEND=noninteractive apt-get -q
 dist-upgrade`.  I've not yet had any problems w/ it; debconf questions
 should use the default, and config files should not be overwritten.  Of
 course, this is w/ stable; I wouldn't trust this w/ testing/unstable.

Thanks much. While I *am* using sid in many cases, that won't be
a problem because I don't do across the board upgrades like this. I
primarily want this for emergency measures due to DSA's, or for
a one time install of some particular pre-tested package to all 
machines.

Your idea looks like it should work a treat.




apt-get in scripts

2002-08-01 Thread Dale Amon
What sort of solution do other use for running an apt-get
from a script? I use cfengine and pre-prepared site configs,
but there are some apps on which apt-get simply won't work
because even -y won't force it to shut up and just default
to something.

Is there some way on a case by case basis to either feed
it an answer or force it to use a blank or whatever, but
only when you specifically tell it install this package
and make something up if you need information. I'll handle
it, trust me.