1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add 'extras' virtual package to fix kernel upgrade fallback from aufs to devicemapper

Added checks for the proper kernel support before blindly installing extras package

Fixes #10859

Signed-off-by: Matt Bentley <mbentley@mbentley.net>
This commit is contained in:
Matt Bentley 2015-02-17 13:58:36 -05:00
parent 88924993a2
commit b89d04dd62

View file

@ -125,7 +125,8 @@ case "$lsb_dist" in
# aufs is preferred over devicemapper; try to ensure the driver is available. # aufs is preferred over devicemapper; try to ensure the driver is available.
if ! grep -q aufs /proc/filesystems && ! $sh_c 'modprobe aufs'; then if ! grep -q aufs /proc/filesystems && ! $sh_c 'modprobe aufs'; then
kern_extras="linux-image-extra-$(uname -r)" if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -q '^ii' 2>/dev/null; then
kern_extras="linux-image-extra-$(uname -r) linux-image-extra-virtual"
apt_get_update apt_get_update
( set -x; $sh_c 'sleep 3; apt-get install -y -q '"$kern_extras" ) || true ( set -x; $sh_c 'sleep 3; apt-get install -y -q '"$kern_extras" ) || true
@ -135,6 +136,12 @@ case "$lsb_dist" in
echo >&2 ' but we still have no AUFS. Docker may not work. Proceeding anyways!' echo >&2 ' but we still have no AUFS. Docker may not work. Proceeding anyways!'
( set -x; sleep 10 ) ( set -x; sleep 10 )
fi fi
else
echo >&2 'Warning: current kernel is not supported by the linux-image-extra-virtual'
echo >&2 ' package. We have no AUFS support. Consider installing the packages'
echo >&2 ' linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.'
( set -x; sleep 10 )
fi
fi fi
# install apparmor utils if they're missing and apparmor is enabled in the kernel # install apparmor utils if they're missing and apparmor is enabled in the kernel