diff --git a/precise/host/hooks/install.d/40-btrfs.sh b/precise/host/hooks/install.d/40-btrfs.sh index b740349..e098396 100755 --- a/precise/host/hooks/install.d/40-btrfs.sh +++ b/precise/host/hooks/install.d/40-btrfs.sh @@ -11,14 +11,57 @@ if [ -z "$BTRFS_DEVICE" ]; then exit 1 fi -apt-get install -y btrfs-tools - if [ "$FORCE" != "yes" ]; then echo "the following is dangerous code. Please execute with FORCE=yes." echo "it DELETES directory /var/lib/docker if you have one." exit 1 fi +## Install latest kernel +if [ "$UPDATE_KERNEL" ]; then + case "$UPDATE_KERNEL" in + ovh) + apt-get install -y lftp &2 + exit 1 + ;; + *) + echo "Unknown \$UPDATE_KERNEL method '$UPDATE_KERNEL'." >&2 + exit 1 + esac +fi + +if [ "$UPDATE_BTRFS_TOOLS" ]; then + ## Install latests ``btrfs-tools``: + ( + apt-get remove -y btrfs-tools /dev/null 2>&1; then umount "$BTRFS_DEVICE" || {