Preseed apt_get for unattended_installs
Installation of some packages require user input, which breaks the entire concept of “unattended” installs. Here’s a quick fix to get around that.
First, on a setup computer, install the following:
sudo apt-get install debconf-utils |
Now, install whatever packages you wish to later install in an unattended mode. Answer the questions for installation appropriately when prompted. Next we will export those answers into a “seed” file that we can use when installing the package on a new machine. For instance, I’ve installed several ldap authentication packages, so I might want to grab all of the settings those packages ask for.
sudo debconf-get-selections | grep ldap > ldap.seed |
If you remember from yesterday, we created an archive that included a setup script and several config files. Place the ldap.seed file inside that archive along with the other scripts, and just before doing the apt-get install add the following line to the add2network.sh file:
debconf-set-selections ./ldap.seed |
And there you have it – your apt-get won’t ask for details anymore.
Source: ossramblings
Follow Us!