Friday, May 3, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 466  / 1 Year ago, sat, march 4, 2023, 6:47:58

I'm trying to make a basic script for deployment of ocs-inventory and I got stuck on a problem.



When I issue this command:



sudo apt-get install -y ocsinventory-agent


The interactive window appears. The only thing I need to do is press enter.



It's the same type of graphic prompt which you get when you are installing kerberos5.



Is there any possibility to include the "enter" in script ?


More From » command-line

 Answers
6

Basically you have to preseed the answer for debconf:



sudo apt-get install debconf-utils
echo "ocsinventory-agent ocsinventory-agent/method select local" | sudo debconf-set-selections
sudo apt-get install -y --force-yes ocsinventory-agent


You can obviously change local by server for your needs.


[#26446] Sunday, March 5, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tersle

Total Points: 342
Total Questions: 109
Total Answers: 99

Location: Kazakhstan
Member since Mon, Sep 26, 2022
2 Years ago
;