5

I'm trying to script automation of a package (steamcmd).

The case figure is the user of the script has been informed pre-emptively of what EULA he/she has agreed to.

good now with that out of the way these are some packages for which this already works:

none ever bothered to explain how they figured out the independent syntax for each of these but I'd like to finally get to the bottom of this so that anyone with the use of this ask ubuntu question may be able to automate installation for package N.

from what I gather the syntax is supposed to be something like :

 echo PACKAGENAME PACKAGENAMEorUSERSPACE/accepted-PACKAGENAME-EULAPART select true | sudo debconf-set-selections
 sudo apt install PACKAGENAME

although I haven't been able to get it to work thus far with many varients of :

 echo steamcmd steamcmd/accepted-steamcmd-eula select true | sudo debconf-set-selections
tatsu
  • 3,107

1 Answers1

7

so as it turns out installing the app using the GUI once will allow you to then use debconf-show to determine the correct syntax for your "auto-accept" for example :

sudo debconf-show ttf-mscorefonts-installer
  msttcorefonts/dldir:
  msttcorefonts/error-mscorefonts-eula:
* msttcorefonts/accepted-mscorefonts-eula: true
* msttcorefonts/present-mscorefonts-eula:
  msttcorefonts/dlurl:
  msttcorefonts/baddldir:

or

sudo debconf-show steam
* steam/question: I AGREE
* steam/license:
* steam/purge:

stars show modified entries,

among those there are modified entries that took no value.

For these, you'll have to enter :

echo steam steam/license note '' | sudo debconf-set-selections

for the one's where you want a value :

echo steam steam/question select "I AGREE" | sudo debconf-set-selections

or

echo msttcorefonts msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections

depending on the value type.

once you've perfectly matched the expected.

sudo apt install thing-with-eula-normally

should breeze right on through the middle of your script without stopping it.

tatsu
  • 3,107