File: 04_use_etc_kvm_kvm-ifup.patch

package info (click to toggle)
qemu-kvm 1.1.2%2Bdfsg-6%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 43,848 kB
  • sloc: ansic: 606,321; asm: 10,684; sh: 6,663; perl: 4,223; python: 3,802; makefile: 1,076; objc: 843; xml: 409
file content (32 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Michael Tokarev <mjt@tls.msk.ru>
Subject: use /etc/kvm/kvm-{ifup,ifdown} instead of /etc/qemu-*

Use an independent script to control the network at startup.
Note that the defines are in two places, one ine in net.h
and another in net/tap.h.  Remove the one in tap.h while
we're at it, to stop confusion and compiler warning.

--- a/net.h	2012-05-26 22:37:06.000000000 +0400
+++ b/net.h	2012-05-26 22:44:58.289199910 +0400
@@ -173,8 +173,8 @@ void net_host_device_remove(Monitor *mon
 int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
 int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
 
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
+#define DEFAULT_NETWORK_SCRIPT "/etc/kvm/kvm-ifup"
+#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/kvm/kvm-ifdown"
 #define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
 #define DEFAULT_BRIDGE_INTERFACE "br0"
 
--- a/net/tap.h	2012-05-26 22:37:06.000000000 +0400
+++ b/net/tap.h	2012-05-26 22:43:51.435790967 +0400
@@ -29,8 +29,6 @@
 #include "qemu-common.h"
 #include "qemu-option.h"
 
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
 
 int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);