[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Noninteractive "apt-get upgrade "question.



On Mon, Dec 20, 2004 at 05:31:32PM +1100, Ivan Teliatnikov wrote:
> What is the best way to "apt-get update" a classroom full of debian
> sarge machines. 
> 
> I tired using
> 
> apt-get update
> DEBIAN_FRONTEND=noninteractive apt-get -uy dist-upgrade
> 
> Nevertheless I was asked some questions as follows:
> 
> Configuration file `/etc/profile'
>  ==> Modified (by you or by a script) since installation.
>  ==> Package distributor has shipped an updated version.
>    What would you like to do about it ?

If you're sure these are the only sort of question you'll get, which
seems likely, then this should work:

yes n | apt-get update DEBIAN_FRONTEND=noninteractive apt-get -uy dist-upgrade

This is really dodgy though.  There should be an option to configure
this.  I might look at it a bit more and write a patch or something.

The package maintainer's new config file will still be saved (as
/etc/foo.dpkg-new or something like that), so you can look for such
files after an upgrade (with a script) and update the config files if
necessary.

You can manage configuration files for a whole network centrally
using cfengine2.  (I haven't used this package yet, but it sounds good.)



Reply to: