[gnome-boxes/gnome-3-14] util: Look for bridge.conf in qemu-kvm dir too
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-14] util: Look for bridge.conf in qemu-kvm dir too
- Date: Fri, 22 May 2015 14:37:25 +0000 (UTC)
commit 37a679abcc29a8a7660682dbfff38318f9423fd3
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri May 22 15:29:35 2015 +0100
util: Look for bridge.conf in qemu-kvm dir too
Seems at least in RHEL, bridge.conf is found under /etc/qemu-kvm
and not /etc/qemu/. Let's look for it both directories.
src/util-app.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/util-app.vala b/src/util-app.vala
index 6745c65..202f0cf 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -145,7 +145,12 @@ namespace Boxes {
// Now check if unprivileged qemu is allowed to access it
var file = File.new_for_path ("/etc/qemu/bridge.conf");
uint8[] contents;
- file.load_contents (null, out contents, null);
+ try {
+ file.load_contents (null, out contents, null);
+ } catch (IOError.NOT_FOUND error) {
+ file = File.new_for_path ("/etc/qemu-kvm/bridge.conf");
+ file.load_contents (null, out contents, null);
+ }
libvirt_bridge_net_available = (Regex.match_simple ("^allow.*virbr0", (string) contents));
} catch (GLib.Error error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]