Sample Header Ad - 728x90

How to make apt-get accept new config files in an unattended install of debian from Repo

31 votes
4 answers
24281 views
I am writing a script for a unattended install of a package that is in our repo, it is a software package with one of Debian's marked config files. Is there any option that I can pass to apt-get/aptitude so that it accepts the new config files? Basically I need an apt/aptitude equivalent of dpkg --force-confnew I need to answer the following question posed while apt-get is installing with a Y ---------------------------------------------------------------------------------------- Configuration file `/opt/application/conf/XXX.conf' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : background this process to examine the The default action is to keep your current version. ---------------------------------------------------------------------------------------- Additional Info: Also, I am passing the sudo password in a pipe to execute the command echo "mysudopass"|sudo -S apt-get mypackage This is flagging an error in installation when the installation is at the config interactive phase. I am on Ubuntu 10.04 apt version: apt 0.7.25.3 **Why I cannot use dpkg: These Debians are to be installed from Repo and I don't have local Debians on my machine**
Asked by Raman (411 rep)
Oct 18, 2011, 02:23 AM
Last activity: Mar 17, 2025, 04:38 PM