Update hack/install.sh with some more Ubuntu-specific installation stuff while we're still on AUFS (installing linux-image-extra-$(uname -r) when we can't find AUFS to try to find AUFS)

This commit is contained in:
Tianon Gravi 2013-10-19 23:40:28 -06:00
parent 9bceae2440
commit 3b0cbc59ea
1 changed files with 25 additions and 6 deletions

View File

@ -75,16 +75,35 @@ case "$lsb_dist" in
Ubuntu|Debian)
export DEBIAN_FRONTEND=noninteractive
# TODO remove this comment/section once device-mapper lands
echo 'Warning: Docker currently requires AUFS support in the kernel.'
echo 'Please ensure that your kernel includes such support.'
( set -x; sleep 10 )
did_apt_get_update=
apt_get_update() {
if [ -z "$did_apt_get_update" ]; then
( set -x; $sh_c 'sleep 3; apt-get update' )
did_apt_get_update=1
fi
}
# TODO remove this section once device-mapper lands
if ! grep -q aufs /proc/filesystems && ! modprobe aufs; then
kern_extras="linux-image-extra-$(uname -r)"
apt_get_update
( set -x; $sh_c 'sleep 3; apt-get install -y -q '"$kern_extras" ) || true
if ! grep -q aufs /proc/filesystems && ! modprobe aufs; then
echo >&2 'Warning: tried to install '"$kern_extras"' (for AUFS)'
echo >&2 ' but we still have no AUFS. Docker may not work. Proceeding anyways!'
( set -x; sleep 10 )
fi
fi
if [ ! -e /usr/lib/apt/methods/https ]; then
( set -x; $sh_c 'sleep 3; apt-get update; apt-get install -y -q apt-transport-https' )
apt_get_update
( set -x; $sh_c 'sleep 3; apt-get install -y -q apt-transport-https' )
fi
if [ -z "$curl" ]; then
( set -x; $sh_c 'sleep 3; apt-get update; apt-get install -y -q curl' )
apt_get_update
( set -x; $sh_c 'sleep 3; apt-get install -y -q curl' )
curl='curl -sL'
fi
(