Je voudrais configurer le paquet ubuntu via dpkg-reconfigure avec toutes les valeurs fournies via le mode non interactif (dans le script).
En fait, mon cas est la configuration de Firebird ( http://www.firebirdsql.org/manual/ubusetup.html ), que lorsque vous utilisez la commande:
sudo dpkg-reconfigure firebird2.5-superclassic -freadline
me demande les 2 valeurs, où les réponses seraient «Y» et «newpwd».
L'échantillon de sortie ressemble à ceci:
sudo dpkg-reconfigure firebird2.5-superclassic -freadline
* Firebird 2.5 superclassic server not running
Configuring firebird2.5-superclassic
------------------------------------
Accept if you want Firebird server to start automatically.
If you only need the Firebird client and there are no databases that will be served by this host, decline.
Enable Firebird server? Y
Password for firebird 2.5
-------------------------
Firebird has a special user named SYSDBA, which is the user that has access to all databases. SYSDBA can also create new databases and users. Because of this, it
is necessary to secure SYSDBA with a password.
The password is stored in /etc/firebird/2.5/SYSDBA.password (readable only by root). You may modify it there (don't forget to update the security database too,
using the gsec utility), or you may use dpkg-reconfigure to update both.
To keep your existing password, leave this blank.
Password for SYSDBA:
* Starting Firebird 2.5 superclassic server...
...done.
* Firebird 2.5 superclassic server already running
J'ai essayé here strings
via un script bash comme ceci:
sudo dpkg-reconfigure firebird2.5-superclassic -f readline << EOF
Y
newpwd
EOF
Cependant, cela n'a pas fonctionné pour une raison quelconque et il a demandé que les valeurs soient fournies.
Des idées sur la façon de fournir les valeurs requises au script?