Don't allow virt driver to be configured

This commit is contained in:
James Page 2018-11-01 12:10:37 +00:00
parent e532ef3f6b
commit 07c9154faa
2 changed files with 2 additions and 27 deletions

View File

@ -10,9 +10,5 @@ else
ARCH="$SNAP_ARCH-linux-gnu"
fi
driver="$(snapctl get driver)"
if [ "$driver" = "LIBVIRT" ]; then
export LD_LIBRARY_PATH=$SNAP/lib/$ARCH:$SNAP/usr/lib/$ARCH:$LD_LIBRARY_PATH
exec $SNAP/sbin/libvirtd
fi

21
snap/hooks/configure vendored
View File

@ -1,26 +1,5 @@
#!/bin/bash -e
# Openstack Prep
# which openstack || echo "This snap currently requires the python openstack client to be installed and in your path. The intent is to add the client in before development is complete."; exit 1
# QEMU Setup
echo "qemu setup"
driver="$(snapctl get driver)"
if [[ -n $driver && ! $driver =~ (LIBVIRT|QEMU) ]]; then
echo "\"$driver\" is not a supported virtualization driver"
exit 1
fi
driver_saved="$(cat $SNAP_COMMON/driver)" || true
driver=${driver:-QEMU}
driver_saved=${driver_saved:-QEMU}
if [[ $driver != $driver_saved ]]; then
echo "$driver" > $SNAP_COMMON/driver
snapctl restart $SNAP_NAME
fi
# Install conf.d configuration from snap for db etc
for project in neutron nova keystone glance; do
mkdir -p ${SNAP_COMMON}/etc/${project}/${project}.conf.d