При запуске apt-get -y install <packages ...> в Ubuntu 10.04 я хотел бы apt-get (или aptitude, если это облегчает) не запрашивать меня при установке дополнительных зависимостей (поведение -y, как я его понимаю), но не подскажите мне о перезаписывании конфигурационных файлов, вместо этого предположим, что всегда сохраняем существующие (что обычно является значением по умолчанию). К сожалению, --trivial-only кажется обратным -y и не влияет на подсказку, показанную в соответствии со страницей man.
В конкретных пакетах, таких как samba, nullmailer, localepurge и lighttpd заставили меня взаимодействовать с терминалом, хотя вся процедура была написана сценарием и была неактивной.
Вы можете использовать:
sudo apt-get update
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
Только для определенных пакетов, например. mypackage1 mypackage2:
sudo apt-get update
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install mypackage1 mypackage2
Источник: http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/
Avoiding the conffile prompt
Every time that dpkg must install a new conffile that you have modified
(and a removed file is only a particular case of a modified file in dpkg’s eyes),
it will stop the upgrade and wait your answer. This can be particularly annoying for
major upgrades. That’s why you can give predefined answers to dpkg with the help
of multiple --force-conf* options:
--force-confold: do not modify the current configuration file, the new version
is installed with a .dpkg-dist suffix. With this option alone, even configuration
files that you have not modified are left untouched. You need to combine it with
--force-confdef to let dpkg overwrite configuration files that you have not modified.
--force-confnew: always install the new version of the configuration file, the
current version is kept in a file with the .dpkg-old suffix.
--force-confdef: ask dpkg to decide alone when it can and prompt otherwise. This
is the default behavior of dpkg and this option is mainly useful in combination with
--force-confold.
--force-confmiss: ask dpkg to install the configuration file if it’s currently
missing (for example because you have removed the file by mistake).
If you use Apt, you can pass options to dpkg with a command-line like this:
$ apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
You can also make those options permanent by creating /etc/apt/apt.conf.d/local:
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
Вы можете найти дополнительную информацию и дополнительные параметры в руководстве dpkg в http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/ или man dpkg и т. д. искать «confdef».
Вы можете использовать:
sudo apt-get update
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
Только для определенных пакетов, например. mypackage1 mypackage2:
sudo apt-get update
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install mypackage1 mypackage2
Источник: http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/
Avoiding the conffile prompt
Every time that dpkg must install a new conffile that you have modified
(and a removed file is only a particular case of a modified file in dpkg’s eyes),
it will stop the upgrade and wait your answer. This can be particularly annoying for
major upgrades. That’s why you can give predefined answers to dpkg with the help
of multiple --force-conf* options:
--force-confold: do not modify the current configuration file, the new version
is installed with a .dpkg-dist suffix. With this option alone, even configuration
files that you have not modified are left untouched. You need to combine it with
--force-confdef to let dpkg overwrite configuration files that you have not modified.
--force-confnew: always install the new version of the configuration file, the
current version is kept in a file with the .dpkg-old suffix.
--force-confdef: ask dpkg to decide alone when it can and prompt otherwise. This
is the default behavior of dpkg and this option is mainly useful in combination with
--force-confold.
--force-confmiss: ask dpkg to install the configuration file if it’s currently
missing (for example because you have removed the file by mistake).
If you use Apt, you can pass options to dpkg with a command-line like this:
$ apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
You can also make those options permanent by creating /etc/apt/apt.conf.d/local:
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
Вы можете найти дополнительную информацию и дополнительные параметры в руководстве dpkg в http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/ или man dpkg и т. д. искать «confdef».