3 # Short script for uninstallation of OVS with DPDK
8 # Stopping service if needed
9 echo "[debug] stopping ovs-dpdk (if needed)"
10 sudo service ovs-dpdk status 2>&1 1>/dev/null
13 if [ $res -eq 2 ]; then
14 echo "[warning] service ovs-dpdk is already stopped"
16 echo "[debug] stopping ovs-dpdk service"
17 sudo service ovs-dpdk stop 2>&1 1>/dev/null
20 # Remove ovs-dpdk service
21 echo "[debug] removing ovs-dpdk service"
22 sudo rm -f /etc/default/ovs-dpdk
23 sudo rm -f /etc/init.d/ovs-dpdk
26 echo "[debug] replacing kvm wrapper"
27 if [ -e /usr/bin/kvm ]; then
28 KVM_CMD="/usr/bin/kvm"
29 elif [ -e /usr/bin/qemu-kvm ]; then
30 KVM_CMD="/usr/bin/qemu-kvm"
31 elif [ -e /usr/libexec/qemu-kvm ]; then
32 KVM_CMD="/usr/libexec/qemu-kvm"
34 echo "[warning] package qemu-kvm probably not installed"
37 cat << 'EOF' | sudo tee $KVM_CMD
40 exec /usr/bin/qemu-system-x86_64 "${args[@]}"
45 echo "[warning] git repos were not automatically removed, you can remove it once you're finished with them"