Don't allow virt driver to be configured
This commit is contained in:
parent
e532ef3f6b
commit
07c9154faa
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue