User avatar
PelicanMedia
Posts: 7
Joined: Tue Jul 21, 2015 9:45 am
Location: Colchester, Essex, UK
Contact: Website

Auto accepting EULA

Tue Nov 22, 2016 11:55 am

Hi all,

I am writing an auto update/installation script for a project at work. I am currently using the below in update.sh:

Code: Select all

sudo apt-get clean all &&
sudo apt-get update &&
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" dist-upgrade -y && # to install the package maintainer's version
sudo apt-get -f install &&
sudo apt-get autoremove -y
All the above runs fine, but when it gets to updating the rpi-chromium-mods package, from the cli, I get a full screen message asking to accept the Adobe Flash Player EULA. Once I press return the script carries on.

Is there a way I can automatically accept the EULA ? I'm after as little interaction as possible.

Thanks.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6229
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Auto accepting EULA

Tue Nov 22, 2016 12:10 pm

You can pre-seed debconf prompt answers with debconf-set-selections.

As an alternative, you might be able to use 'DEBIAN_FRONTEND=noninteractive' before the command:

Code: Select all

sudo DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get -fuy --force-yes -o Dpkg::Options::="--force-confnew" dist-upgrade

User avatar
PelicanMedia
Posts: 7
Joined: Tue Jul 21, 2015 9:45 am
Location: Colchester, Essex, UK
Contact: Website

Re: Auto accepting EULA

Tue Nov 22, 2016 2:35 pm

Hi @ShiftPlusOne,

Thanks for your quick reply.
Updated script to now run as:

Code: Select all

sudo apt-get clean all &&
sudo apt-get update &&
sudo DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get -fuy --force-yes -o Dpkg::Options::="--force-confold" dist-upgrade -y && # to keep old versions
sudo apt-get -f install &&
sudo apt-get autoremove -y
Works a treat !! Thank you !

P.S. - I did change "--force-confnew" to "--force-confold" as I broke it ! :roll:

Return to “Troubleshooting”