From 07c9154faa8de7fdd727fc530e30c35194e78c60 Mon Sep 17 00:00:00 2001 From: James Page Date: Thu, 1 Nov 2018 12:10:37 +0000 Subject: [PATCH] Don't allow virt driver to be configured --- snap/bin/launch-libvirtd | 8 ++------ snap/hooks/configure | 21 --------------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/snap/bin/launch-libvirtd b/snap/bin/launch-libvirtd index 1951064..4b69d66 100755 --- a/snap/bin/launch-libvirtd +++ b/snap/bin/launch-libvirtd @@ -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 +export LD_LIBRARY_PATH=$SNAP/lib/$ARCH:$SNAP/usr/lib/$ARCH:$LD_LIBRARY_PATH +exec $SNAP/sbin/libvirtd diff --git a/snap/hooks/configure b/snap/hooks/configure index 322736f..ae3ec02 100755 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -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