Saya ingin mengonfigurasi paket ubuntu melalui dpkg-reconfigure dengan semua nilai yang disediakan melalui mode non-interaktif (dalam skrip).
Sebenarnya kasus saya adalah konfigurasi firebird ( http://www.firebirdsql.org/manual/ubusetup.html ), yang ketika menggunakan perintah:
sudo dpkg-reconfigure firebird2.5-superclassic -freadline
meminta saya untuk 2 nilai, di mana jawabannya adalah 'Y' dan 'newpwd'.
Output sampel terlihat seperti ini:
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
Saya sudah mencoba here strings
melalui skrip bash seperti ini:
sudo dpkg-reconfigure firebird2.5-superclassic -f readline << EOF
Y
newpwd
EOF
Namun ini tidak berhasil karena suatu alasan dan meminta nilai yang diberikan.
Adakah ide bagaimana memberi nilai pada skrip?