tests-always-included / wick

Bash-only IT automation, machine provisioning
Other
69 stars 12 forks source link

Handle certain cases where apt-get asks the user for input #124

Closed ghost closed 6 years ago

ghost commented 6 years ago

Certain packages prompt the user for input. The extra added parameters will instruct apt to just apply the default choice.

NOTE: This is similar to "DEBIAN_FRONTEND=noninteractive" , but not the same. Apparently there are two different systems that can be used to interact with the user during installations and this one makes the second system non-interactive as well

fidian commented 6 years ago

It looks like you doubled the apt-get command in there. Was that intentional? If not, would you submit another commit to the pull request to remove those extra characters?

ghost commented 6 years ago

Hey there. The command was intended to look as it was committed: if DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" apt-get upgrade -y; I

The logic being: (set default behavior for packages type 1) (set default behavior for packages type 2) (execute apt-get with settings configured by previous commands)

However I agree that it looks more readable if we combine the two apt-get commands into a single one (I have updated the pull request), so the "--force-confdef" will now be a parameter to the single apt-get command, rather than a setting that is applied, before the "apt-get upgrade" command

fidian commented 6 years ago

Thanks for the update! I really appreciate the contribution and your willingness to condense the command.