rc: workaround for apt Happy Eyeballs

Closes #65
This commit is contained in:
Aminda Suomalainen 2015-07-22 15:51:20 +03:00
parent 4ef91d2ba4
commit 386f39939c
2 changed files with 6 additions and 2 deletions

View File

@ -216,11 +216,13 @@ UNAME=$(uname)
CPUARCH=$(uname -p)
# If we are on Linux, enable apt progress bar and colours
# and Happy Eyeballs workaround https://pad.lv/1308200
if [[ $USER = "root" ]]; then
mkdir -p /etc/apt/apt.conf.d/
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
echo 'DPkgPM::Progress-Fancy "1";' >> /etc/apt/apt.conf.d/99progressbar
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
echo 'Acquire::http::Timeout "2";' > /etc/apt/apt.conf.d/99timeout
echo 'Acquire::ftp::Timeout "2";' >> /etc/apt/apt.conf.d/99timeout
fi
# Copied from http://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/

View File

@ -163,11 +163,13 @@ export SSH_AUTH_SOCK=/tmp/$USER.agent
ssh-agent -a /tmp/$USER.agent > /dev/null 2>&1
# If we are on Linux, enable apt progress bar and colours
# and Happy Eyeballs workaround https://pad.lv/1308200
if [[ $USER = "root" ]]; then
mkdir -p /etc/apt/apt.conf.d/
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
echo 'DPkgPM::Progress-Fancy "1";' >> /etc/apt/apt.conf.d/99progressbar
echo 'APT::Color "1";' > /etc/apt/apt.conf.d/99color
echo 'Acquire::http::Timeout "2";' > /etc/apt/apt.conf.d/99timeout
echo 'Acquire::ftp::Timeout "2";' >> /etc/apt/apt.conf.d/99timeout
fi
# In our series useless/weird environment variables, beep