375ddd1e9e
This change aims to add the foundations for CentOS support on manila-image-elements. In this patch-set, the following has been modified - Added elements for manila-centos-minimal - Added elements for centos-nfs - Added elements for centos-cifs - Renamed all elements for the different protocols to distro-protocol to facilitate automation - Modified the main script to take the distro param Follow-up patches will add centos-based elements for all other protocols supported. Change-Id: Ie1469a8b3973b9a15c3fa27688df3b7e7e8da688 Partial-Bug: #1675538
58 lines
1.6 KiB
Bash
Executable File
58 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
# NOTE(vponomaryov): this approach of ZFS installation is valid for
|
|
# Ubuntu 14.04 (Trusty) and is very likely to be different for other releases.
|
|
# Also, ZFS should be installed in 'post-install.d' section because its
|
|
# dependency 'dkms' is installed in 'install.d/99-dkms'.
|
|
|
|
# Presence of 'ARCH' env var blocks DKMS from building new dynamic kernel
|
|
# modules. So, unset it temporary.
|
|
ARCH_BACKUP=$ARCH
|
|
unset ARCH
|
|
|
|
# Install 'software-properties-common' to get 'apt-add-repository' installed
|
|
apt-get install -y software-properties-common
|
|
|
|
# Register ZFS private package archive
|
|
apt-add-repository --yes ppa:zfs-native/stable
|
|
|
|
# Update list of available packages and then upgrade
|
|
apt-get -y -q update && apt-get -y -q upgrade
|
|
|
|
# 'linux-headers-*' should be installed prior to any dynamic kernel modules,
|
|
# which are 'zfs' and its dependency 'spl'.
|
|
# Same about 'build-essential', that is required for package compilations.
|
|
apt-get install -y linux-headers-generic
|
|
apt-get install -y build-essential
|
|
|
|
# Install ZFS for Ubuntu
|
|
apt-get install -y ubuntu-zfs
|
|
|
|
echo """
|
|
# Expected following template:
|
|
# %module-name%, %module-version%, %kernel-version%, %arch%: installed
|
|
#
|
|
# examples:
|
|
# spl, 0.6.5.4, 3.13.0-76-generic, x86_64: installed
|
|
# zfs, 0.6.5.4, 3.13.0-76-generic, x86_64: installed
|
|
#
|
|
# If it looks like following:
|
|
# spl, x.y.z, added
|
|
# zfs, x.y.z, added
|
|
#
|
|
# then something went wrong.
|
|
#
|
|
# List of dynamic kernel modules:
|
|
"""
|
|
dkms status
|
|
|
|
# Return back env var changes
|
|
export ARCH=$ARCH_BACKUP
|
|
unset ARCH_BACKUP
|