[gnome-boxes] 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] util: Look for bridge.conf in qemu-kvm dir too
- Date: Fri, 22 May 2015 16:35:55 +0000 (UTC)
commit e7a5d7235843af4f1cdb4a97917768873f3bc53b
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 5fff6ac..ddc4ce4 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]