Support This Project

How to preseed values for debian package

Here's how to make a fully automated (without interaction) installation of the OcsInventory-NG agent on debian, using packages:

  • Create a seed file (see above for file creation) with answers to questions asked during interactive installation:
    # cat ocsinv.preseed
    ocsinventory-agent      ocsinventory-agent/method       select  http
    ocsinventory-agent      ocsinventory-agent/tag  string  LINUX
    ocsinventory-agent      ocsinventory-agent/server       string  ocs.mydomain.com
    
  • Import seed file:
    # debconf-set-selections ocsinv.preseed
    
  • Install ocs:
    apt-get install ocsinventory-agent
    

The installation will not ask any questions.

  • Creating a seed file from an installed package:

To create the seed file, the easiest way is to make the installation interactively once on a machine. Then, using tools from the debconf-utils package, get the answers from the debconf database:

debconf-get-selections |grep ocsinv > ocsinv.preseed

Note This methode can be applied to any debian package, not just OcsInventory !