Как установить rsyslog-pgsql через preseed-файл и установить linux с ответами по умолчанию

У меня есть постустановочный скрипт:

unset DEBIAN_HAS_FRONTEND DEBIAN_FRONTEND DEBCONF_REDIR DEBCONF_OLD_FD_BASE
export DEBIAN_FRONTEND=noninteractive
aptitude -y install rsyslog-pgsql > /var/tmp/log 2>&1

Во время установки (ps ax):

17547 tty1     S+     0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/rsyslog-pgsql.postinst configure
17587 tty1     S+     0:00 /bin/sh /var/lib/dpkg/info/rsyslog-pgsql.postinst configure
17828 tty1     S+     0:00 whiptail --backtitle Package configuration --title Configuring rsyslog-pgsql --output-fd 11 --nocancel --msgbox An error occurred while installing the database:  Password: su: System error  If at this point you choose "retry", you will be prompted with all the  configuration questions once more and another attempt will be made at  performing the operation. "retry (skip questions)" will immediately  attempt the operation again, skipping all questions.  If you choose  "abort", the operation will fail and you will need to downgrade,  reinstall, reconfigure this package, or otherwise manually intervene to  continue using it.  If you choose "ignore", the operation will continue, ignoring further errors from dbconfig-common. 18 77

И ждет выбора пользователя. Как пропустить все вопросы и установить их по умолчанию?


person Šerg    schedule 31.08.2015    source источник


Ответы (1)


  1. установить пакет

    $ sudo apt -q -y install pkg
    
  2. установить утилиты debconf

    # if you don't know the question
    $ sudo apt install debconf-utils
    
  3. найти вопрос ("что такое матрица?")

    # find the question you need answered (use less instead)
    $ sudo debconf-get-selections | grep pkg
    
  4. удалить пакет (очистить)

    $ sudo apt-get purge pkg
    
  5. установите нужный вам ответ

    echo 'pkg       thequestionname      type value' | sudo debconf-set-selections;
    
  6. установить пакет

    sudo apt-get install pkg
    

Если вы обновляете пакеты, в которых есть новые вопросы, вы можете запустить обновление на vagrant, найти вопросы, а затем выполнить предварительную настройку перед автоматическим обновлением в производственной среде.

    man debconf-set-selections

Следуйте за черным кроликом.

person Thandie Newton    schedule 16.05.2018