Ensure the (block) loop device is available.

This may not be present by default if it's available
only as a loadable module.

Change-Id: Iafabda2eb239e8f6d1697aa632678e4ca24bdef5
This commit is contained in:
Jan Grant 2014-03-24 16:01:43 +00:00
parent a7f5fff3b5
commit 0ecebcf9d7

View File

@ -2,3 +2,12 @@
set -eux
os-svc-daemon -i "$CINDER_VENV_DIR" cinder-volume cinder cinder-volume "--config-dir /etc/cinder"
# Ensure the loop block device is available
case $(lsb_release -si) in
Ubuntu|Debian)
if ! grep -Fxq loop /etc/modules; then
echo "loop" >> /etc/modules
fi
;;
esac