Drop patches
0008-syntax-error-Bad-fd-number-when-stopping-libvirt-gue.patch - fixed upstream http://libvirt.org/git/?p=libvirt.git;a=commit;h=68e5e4672a39e5aff135a898b692a7c0fc4874b2
0009-Missing-Default-Stop-field-in-LSB-comment-in-libvirt.patch - fixed upstream http://libvirt.org/git/?p=libvirt.git;a=commit;h=84094af780adf629a792d9614d88963baaa9a753
Laurent LĂ©onard
13 years ago
6 | 6 | 1 files changed, 1 insertions(+), 1 deletions(-) |
7 | 7 | |
8 | 8 | diff --git a/tools/virsh.pod b/tools/virsh.pod |
9 | index c97786a..b0c312c 100644 | |
9 | index 9c45a61..e3e9915 100644 | |
10 | 10 | --- a/tools/virsh.pod |
11 | 11 | +++ b/tools/virsh.pod |
12 | 12 | @@ -97,7 +97,7 @@ Output elapsed time information for each command. |
7 | 7 | 2 files changed, 0 insertions(+), 6 deletions(-) |
8 | 8 | |
9 | 9 | diff --git a/src/Makefile.am b/src/Makefile.am |
10 | index a9a1986..8ec162a 100644 | |
10 | index c13724a..12b492b 100644 | |
11 | 11 | --- a/src/Makefile.am |
12 | 12 | +++ b/src/Makefile.am |
13 | @@ -1197,9 +1197,6 @@ if WITH_NETWORK | |
13 | @@ -1244,9 +1244,6 @@ if WITH_NETWORK | |
14 | 14 | cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \ |
15 | 15 | $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \ |
16 | 16 | rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; } |
21 | 21 | |
22 | 22 | uninstall-local:: |
23 | 23 | diff --git a/src/Makefile.in b/src/Makefile.in |
24 | index 7893ea5..1a8853e 100644 | |
24 | index ea9c404..9d8df32 100644 | |
25 | 25 | --- a/src/Makefile.in |
26 | 26 | +++ b/src/Makefile.in |
27 | @@ -5174,9 +5174,6 @@ install-data-local: | |
27 | @@ -5426,9 +5426,6 @@ install-data-local: | |
28 | 28 | @WITH_NETWORK_TRUE@ cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \ |
29 | 29 | @WITH_NETWORK_TRUE@ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \ |
30 | 30 | @WITH_NETWORK_TRUE@ rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; } |
11 | 11 | 5 files changed, 6 insertions(+), 6 deletions(-) |
12 | 12 | |
13 | 13 | diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c |
14 | index b7661c0..87155ab 100644 | |
14 | index ead8ee9..33f280a 100644 | |
15 | 15 | --- a/src/xen/xen_hypervisor.c |
16 | 16 | +++ b/src/xen/xen_hypervisor.c |
17 | 17 | @@ -2269,7 +2269,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, |
15 | 15 | 1 files changed, 40 insertions(+), 7 deletions(-) |
16 | 16 | |
17 | 17 | diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c |
18 | index e6eb9b5..65bb6a0 100644 | |
18 | index ee2de4a..9788874 100644 | |
19 | 19 | --- a/src/remote/remote_driver.c |
20 | 20 | +++ b/src/remote/remote_driver.c |
21 | @@ -737,7 +737,8 @@ doRemoteOpen (virConnectPtr conn, | |
21 | @@ -732,7 +732,8 @@ doRemoteOpen (virConnectPtr conn, | |
22 | 22 | } |
23 | 23 | |
24 | 24 | case trans_ssh: { |
28 | 28 | |
29 | 29 | if (username) nr_args += 2; /* For -l username */ |
30 | 30 | if (no_tty) nr_args += 5; /* For -T -o BatchMode=yes -e none */ |
31 | @@ -770,12 +771,44 @@ doRemoteOpen (virConnectPtr conn, | |
31 | @@ -765,12 +766,44 @@ doRemoteOpen (virConnectPtr conn, | |
32 | 32 | cmd_argv[j++] = strdup ("none"); |
33 | 33 | } |
34 | 34 | cmd_argv[j++] = strdup (priv->hostname); |
40 | 40 | 1 files changed, 9 insertions(+), 1 deletions(-) |
41 | 41 | |
42 | 42 | diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c |
43 | index 64ec57b..d938800 100644 | |
43 | index 11a9391..5feb029 100644 | |
44 | 44 | --- a/src/qemu/qemu_monitor_text.c |
45 | 45 | +++ b/src/qemu/qemu_monitor_text.c |
46 | 46 | @@ -1125,7 +1125,15 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon, |
9 | 9 | 1 files changed, 4 insertions(+), 0 deletions(-) |
10 | 10 | |
11 | 11 | diff --git a/src/util/iptables.c b/src/util/iptables.c |
12 | index fe78d1c..e47aeda 100644 | |
12 | index 6770fe0..1fce1ec 100644 | |
13 | 13 | --- a/src/util/iptables.c |
14 | 14 | +++ b/src/util/iptables.c |
15 | @@ -878,6 +878,7 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx, | |
15 | @@ -861,6 +861,7 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx, | |
16 | 16 | int port, |
17 | 17 | int action) |
18 | 18 | { |
20 | 20 | char portstr[32]; |
21 | 21 | |
22 | 22 | snprintf(portstr, sizeof(portstr), "%d", port); |
23 | @@ -890,6 +891,9 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx, | |
23 | @@ -874,6 +875,9 @@ iptablesOutputFixUdpChecksum(iptablesContext *ctx, | |
24 | 24 | "--destination-port", portstr, |
25 | 25 | "--jump", "CHECKSUM", "--checksum-fill", |
26 | 26 | NULL); |
0 | From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent@open-minds.org> | |
1 | Date: Thu, 9 Dec 2010 22:36:29 +0100 | |
2 | Subject: [PATCH] Debianize libvirt-guests | |
3 | ||
4 | Origin: vendor | |
5 | --- | |
6 | tools/libvirt-guests.init.in | 79 +++++++++++++++++------------------------- | |
7 | tools/libvirt-guests.sysconf | 6 ++-- | |
8 | 2 files changed, 35 insertions(+), 50 deletions(-) | |
9 | ||
10 | diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in | |
11 | index e28938d..0fe82fb 100644 | |
12 | --- a/tools/libvirt-guests.init.in | |
13 | +++ b/tools/libvirt-guests.init.in | |
14 | @@ -4,8 +4,8 @@ | |
15 | # | |
16 | ### BEGIN INIT INFO | |
17 | # Provides: libvirt-guests | |
18 | -# Required-Start: libvirtd | |
19 | -# Required-Stop: libvirtd | |
20 | +# Required-Start: $remote_fs libvirt-bin | |
21 | +# Required-Stop: $remote_fs libvirt-bin | |
22 | # Default-Start: 2 3 4 5 | |
23 | # Default-Stop: 0 1 6 | |
24 | # Short-Description: suspend/resume libvirt guests on shutdown/boot | |
25 | @@ -14,33 +14,19 @@ | |
26 | # See http://libvirt.org | |
27 | ### END INIT INFO | |
28 | ||
29 | -# the following is chkconfig init header | |
30 | -# | |
31 | -# libvirt-guests: suspend/resume libvirt guests on shutdown/boot | |
32 | -# | |
33 | -# chkconfig: 345 99 01 | |
34 | -# description: This is a script for suspending active libvirt guests \ | |
35 | -# on shutdown and resuming them on next boot \ | |
36 | -# See http://libvirt.org | |
37 | -# | |
38 | - | |
39 | -sysconfdir=@sysconfdir@ | |
40 | -localstatedir=@localstatedir@ | |
41 | -libvirtd=@sbindir@/libvirtd | |
42 | - | |
43 | -# Source function library. | |
44 | -test ! -r "$sysconfdir"/rc.d/init.d/functions || | |
45 | - . "$sysconfdir"/rc.d/init.d/functions | |
46 | +sysconfdir=/etc | |
47 | +localstatedir=/var | |
48 | +libvirtd=/usr/sbin/libvirtd | |
49 | ||
50 | URIS=default | |
51 | -ON_BOOT=start | |
52 | -ON_SHUTDOWN=suspend | |
53 | -SHUTDOWN_TIMEOUT=0 | |
54 | +ON_BOOT=ignore | |
55 | +ON_SHUTDOWN=shutdown | |
56 | +SHUTDOWN_TIMEOUT=30 | |
57 | ||
58 | -test -f "$sysconfdir"/sysconfig/libvirt-guests && . "$sysconfdir"/sysconfig/libvirt-guests | |
59 | +test -f "$sysconfdir"/default/libvirt-guests && . "$sysconfdir"/default/libvirt-guests | |
60 | ||
61 | LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests | |
62 | -VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests | |
63 | +VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests | |
64 | ||
65 | RETVAL=0 | |
66 | ||
67 | @@ -129,7 +115,7 @@ start() { | |
68 | [ -f "$LISTFILE" ] || { started; return 0; } | |
69 | ||
70 | if [ "x$ON_BOOT" != xstart ]; then | |
71 | - echo $"libvirt-guests is configured not to start any guests on boot" | |
72 | + echo "libvirt-guests is configured not to start any guests on boot" | |
73 | rm -f "$LISTFILE" | |
74 | started | |
75 | return 0 | |
76 | @@ -144,20 +130,20 @@ start() { | |
77 | fi | |
78 | done | |
79 | if ! $configured; then | |
80 | - echo $"Ignoring guests on $uri URI" | |
81 | + echo "Ignoring guests on $uri URI" | |
82 | continue | |
83 | fi | |
84 | ||
85 | - echo $"Resuming guests on $uri URI..." | |
86 | + echo "Resuming guests on $uri URI..." | |
87 | for guest in $list; do | |
88 | name=$(guest_name $uri $guest) | |
89 | - echo -n $"Resuming guest $name: " | |
90 | + echo -n "Resuming guest $name: " | |
91 | if guest_is_on $uri $guest; then | |
92 | if $guest_running; then | |
93 | - echo $"already active" | |
94 | + echo "already active" | |
95 | else | |
96 | retval run_virsh $uri start "$name" >/dev/null && \ | |
97 | - echo $"done" | |
98 | + echo "done" | |
99 | fi | |
100 | fi | |
101 | done | |
102 | @@ -173,7 +159,7 @@ suspend_guest() | |
103 | guest=$2 | |
104 | ||
105 | name=$(guest_name $uri $guest) | |
106 | - label=$"Suspending $name: " | |
107 | + label="Suspending $name: " | |
108 | echo -n "$label" | |
109 | run_virsh $uri managedsave $guest >/dev/null & | |
110 | virsh_pid=$! | |
111 | @@ -188,7 +174,7 @@ suspend_guest() | |
112 | printf '\r%s%-12s ' "$label" "..." | |
113 | fi | |
114 | done | |
115 | - retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" $"done" | |
116 | + retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" "done" | |
117 | } | |
118 | ||
119 | shutdown_guest() | |
120 | @@ -197,7 +183,7 @@ shutdown_guest() | |
121 | guest=$2 | |
122 | ||
123 | name=$(guest_name $uri $guest) | |
124 | - label=$"Shutting down $name: " | |
125 | + label="Shutting down $name: " | |
126 | echo -n "$label" | |
127 | retval run_virsh $uri shutdown $guest >/dev/null || return | |
128 | timeout=$SHUTDOWN_TIMEOUT | |
129 | @@ -211,9 +197,9 @@ shutdown_guest() | |
130 | ||
131 | if guest_is_on $uri $guest; then | |
132 | if $guest_running; then | |
133 | - printf '\r%s%-12s\n' "$label" $"failed to shutdown in time" | |
134 | + printf '\r%s%-12s\n' "$label" "failed to shutdown in time" | |
135 | else | |
136 | - printf '\r%s%-12s\n' "$label" $"done" | |
137 | + printf '\r%s%-12s\n' "$label" "done" | |
138 | fi | |
139 | fi | |
140 | } | |
141 | @@ -226,7 +212,7 @@ stop() { | |
142 | if [ "x$ON_SHUTDOWN" = xshutdown ]; then | |
143 | suspending=false | |
144 | if [ $SHUTDOWN_TIMEOUT -le 0 ]; then | |
145 | - echo $"Shutdown action requested but SHUTDOWN_TIMEOUT was not set" | |
146 | + echo "Shutdown action requested but SHUTDOWN_TIMEOUT was not set" | |
147 | RETVAL=6 | |
148 | return | |
149 | fi | |
150 | @@ -234,10 +220,10 @@ stop() { | |
151 | ||
152 | : >"$LISTFILE" | |
153 | for uri in $URIS; do | |
154 | - echo -n $"Running guests on $uri URI: " | |
155 | + echo -n "Running guests on $uri URI: " | |
156 | ||
157 | if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then | |
158 | - echo $"libvirtd not installed; skipping this URI." | |
159 | + echo "libvirtd not installed; skipping this URI." | |
160 | continue | |
161 | fi | |
162 | ||
163 | @@ -250,7 +236,7 @@ stop() { | |
164 | empty=false | |
165 | done | |
166 | if $empty; then | |
167 | - echo $"no running guests." | |
168 | + echo "no running guests." | |
169 | else | |
170 | echo | |
171 | echo $uri $list >>"$LISTFILE" | |
172 | @@ -260,9 +246,9 @@ stop() { | |
173 | ||
174 | while read uri list; do | |
175 | if $suspending; then | |
176 | - echo $"Suspending guests on $uri URI..." | |
177 | + echo "Suspending guests on $uri URI..." | |
178 | else | |
179 | - echo $"Shutting down guests on $uri URI..." | |
180 | + echo "Shutting down guests on $uri URI..." | |
181 | fi | |
182 | ||
183 | for guest in $list; do | |
184 | @@ -286,17 +272,16 @@ gueststatus() { | |
185 | ||
186 | # rh_status | |
187 | # Display current status: whether saved state exists, and whether start | |
188 | -# has been executed. We cannot use status() from the functions library, | |
189 | -# since there is no external daemon process matching this init script. | |
190 | +# has been executed. | |
191 | rh_status() { | |
192 | if [ -f "$LISTFILE" ]; then | |
193 | - echo $"stopped, with saved guests" | |
194 | + echo "stopped, with saved guests" | |
195 | RETVAL=3 | |
196 | else | |
197 | if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then | |
198 | - echo $"started" | |
199 | + echo "started" | |
200 | else | |
201 | - echo $"stopped, with no saved guests" | |
202 | + echo "stopped, with no saved guests" | |
203 | fi | |
204 | RETVAL=0 | |
205 | fi | |
206 | @@ -305,7 +290,7 @@ rh_status() { | |
207 | # usage [val] | |
208 | # Display usage string, then exit with VAL (defaults to 2). | |
209 | usage() { | |
210 | - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}" | |
211 | + echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}" | |
212 | exit ${1-2} | |
213 | } | |
214 | ||
215 | diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf | |
216 | index cd58728..53d89bd 100644 | |
217 | --- a/tools/libvirt-guests.sysconf | |
218 | +++ b/tools/libvirt-guests.sysconf | |
219 | @@ -8,7 +8,7 @@ | |
220 | # - ignore libvirt-guests init script won't start any guest on boot, however, | |
221 | # guests marked as autostart will still be automatically started by | |
222 | # libvirtd | |
223 | -#ON_BOOT=start | |
224 | +#ON_BOOT=ignore | |
225 | ||
226 | # action taken on host shutdown | |
227 | # - suspend all running guests are suspended using virsh managedsave | |
228 | @@ -18,7 +18,7 @@ | |
229 | # which just needs a long time to shutdown. When setting | |
230 | # ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a | |
231 | # value suitable for your guests. | |
232 | -#ON_SHUTDOWN=suspend | |
233 | +#ON_SHUTDOWN=shutdown | |
234 | ||
235 | # number of seconds we're willing to wait for a guest to shut down | |
236 | -#SHUTDOWN_TIMEOUT=0 | |
237 | +#SHUTDOWN_TIMEOUT=30 | |
238 | -- |
0 | From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent@open-minds.org> | |
1 | Date: Sun, 5 Dec 2010 18:53:26 +0100 | |
2 | Subject: [PATCH] syntax error "Bad fd number" when stopping libvirt-guests | |
3 | ||
4 | When libvirt-guests is being stopped, I get the following message: | |
5 | $Running guests on default URI: test-vm | |
6 | $Suspending guests on default URI... | |
7 | $Suspending test-vm: /etc/init.d/libvirt-guests: 340: Syntax error: Bad fd | |
8 | number | |
9 | ||
10 | Origin: upstream, http://libvirt.org/git/?p=libvirt.git;a=commit;h=68e5e4672a39e5aff135a898b692a7c0fc4874b2 | |
11 | --- | |
12 | AUTHORS | 1 + | |
13 | tools/libvirt-guests.init.in | 2 +- | |
14 | 2 files changed, 2 insertions(+), 1 deletions(-) | |
15 | ||
16 | diff --git a/AUTHORS b/AUTHORS | |
17 | index 16c755d..3b5318a 100644 | |
18 | --- a/AUTHORS | |
19 | +++ b/AUTHORS | |
20 | @@ -136,6 +136,7 @@ Patches have also been contributed by: | |
21 | Osier Yang <jyang@redhat.com> | |
22 | Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | |
23 | Wen Congyang <wency@cn.fujitsu.com> | |
24 | + Laurent LĂ©onard <laurent@open-minds.org> | |
25 | ||
26 | [....send patches to get your name here....] | |
27 | ||
28 | diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in | |
29 | index 4e0682d..76dc627 100644 | |
30 | --- a/tools/libvirt-guests.init.in | |
31 | +++ b/tools/libvirt-guests.init.in | |
32 | @@ -177,7 +177,7 @@ suspend_guest() | |
33 | virsh_pid=$! | |
34 | while true; do | |
35 | sleep 1 | |
36 | - kill -0 $virsh_pid >&/dev/null || break | |
37 | + kill -0 $virsh_pid >/dev/null 2>&1 || break | |
38 | progress=$(run_virsh_c $uri domjobinfo $guest 2>/dev/null | \ | |
39 | awk '/^Data processed:/{print $3, $4}') | |
40 | if [ -n "$progress" ]; then | |
41 | -- |
0 | From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent@open-minds.org> | |
1 | Date: Sun, 5 Dec 2010 19:49:39 +0100 | |
2 | Subject: [PATCH] Missing "Default-Stop" field in LSB comment in libvirt-guests | |
3 | MIME-Version: 1.0 | |
4 | Content-Type: text/plain; charset=UTF-8 | |
5 | Content-Transfer-Encoding: 8bit | |
6 | ||
7 | The "Default-Stop" field in LSB comment in libvirt-guests is missing and should | |
8 | be added. I also suggests to add runlevel 2 to the "Default-Start" field. | |
9 | ||
10 | -- | |
11 | Laurent LĂ©onard | |
12 | ||
13 | Origin: upstream, http://libvirt.org/git/?p=libvirt.git;a=commit;h=84094af780adf629a792d9614d88963baaa9a753 | |
14 | --- | |
15 | tools/libvirt-guests.init.in | 3 ++- | |
16 | 1 files changed, 2 insertions(+), 1 deletions(-) | |
17 | ||
18 | diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in | |
19 | index 76dc627..5dab36b 100644 | |
20 | --- a/tools/libvirt-guests.init.in | |
21 | +++ b/tools/libvirt-guests.init.in | |
22 | @@ -6,7 +6,8 @@ | |
23 | # Provides: libvirt-guests | |
24 | # Required-Start: libvirtd | |
25 | # Required-Stop: libvirtd | |
26 | -# Default-Start: 3 4 5 | |
27 | +# Default-Start: 2 3 4 5 | |
28 | +# Default-Stop: 0 1 6 | |
29 | # Short-Description: suspend/resume libvirt guests on shutdown/boot | |
30 | # Description: This is a script for suspending active libvirt guests | |
31 | # on shutdown and resuming them on next boot | |
32 | -- |
0 | From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent@open-minds.org> | |
1 | Date: Thu, 9 Dec 2010 22:36:29 +0100 | |
2 | Subject: [PATCH] Debianize libvirt-guests | |
3 | ||
4 | Origin: vendor | |
5 | --- | |
6 | tools/libvirt-guests.init.in | 78 +++++++++++++++++------------------------ | |
7 | tools/libvirt-guests.sysconf | 6 ++-- | |
8 | 2 files changed, 35 insertions(+), 49 deletions(-) | |
9 | ||
10 | diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in | |
11 | index 5dab36b..0fe82fb 100644 | |
12 | --- a/tools/libvirt-guests.init.in | |
13 | +++ b/tools/libvirt-guests.init.in | |
14 | @@ -4,8 +4,8 @@ | |
15 | # | |
16 | ### BEGIN INIT INFO | |
17 | # Provides: libvirt-guests | |
18 | -# Required-Start: libvirtd | |
19 | -# Required-Stop: libvirtd | |
20 | +# Required-Start: $remote_fs libvirt-bin | |
21 | +# Required-Stop: $remote_fs libvirt-bin | |
22 | # Default-Start: 2 3 4 5 | |
23 | # Default-Stop: 0 1 6 | |
24 | # Short-Description: suspend/resume libvirt guests on shutdown/boot | |
25 | @@ -14,32 +14,19 @@ | |
26 | # See http://libvirt.org | |
27 | ### END INIT INFO | |
28 | ||
29 | -# the following is chkconfig init header | |
30 | -# | |
31 | -# libvirt-guests: suspend/resume libvirt guests on shutdown/boot | |
32 | -# | |
33 | -# chkconfig: 345 99 01 | |
34 | -# description: This is a script for suspending active libvirt guests \ | |
35 | -# on shutdown and resuming them on next boot \ | |
36 | -# See http://libvirt.org | |
37 | -# | |
38 | - | |
39 | -sysconfdir=@sysconfdir@ | |
40 | -localstatedir=@localstatedir@ | |
41 | -libvirtd=@sbindir@/libvirtd | |
42 | - | |
43 | -# Source function library. | |
44 | -. "$sysconfdir"/rc.d/init.d/functions | |
45 | +sysconfdir=/etc | |
46 | +localstatedir=/var | |
47 | +libvirtd=/usr/sbin/libvirtd | |
48 | ||
49 | URIS=default | |
50 | -ON_BOOT=start | |
51 | -ON_SHUTDOWN=suspend | |
52 | -SHUTDOWN_TIMEOUT=0 | |
53 | +ON_BOOT=ignore | |
54 | +ON_SHUTDOWN=shutdown | |
55 | +SHUTDOWN_TIMEOUT=30 | |
56 | ||
57 | -test -f "$sysconfdir"/sysconfig/libvirt-guests && . "$sysconfdir"/sysconfig/libvirt-guests | |
58 | +test -f "$sysconfdir"/default/libvirt-guests && . "$sysconfdir"/default/libvirt-guests | |
59 | ||
60 | LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests | |
61 | -VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests | |
62 | +VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests | |
63 | ||
64 | RETVAL=0 | |
65 | ||
66 | @@ -128,7 +115,7 @@ start() { | |
67 | [ -f "$LISTFILE" ] || { started; return 0; } | |
68 | ||
69 | if [ "x$ON_BOOT" != xstart ]; then | |
70 | - echo $"libvirt-guests is configured not to start any guests on boot" | |
71 | + echo "libvirt-guests is configured not to start any guests on boot" | |
72 | rm -f "$LISTFILE" | |
73 | started | |
74 | return 0 | |
75 | @@ -143,20 +130,20 @@ start() { | |
76 | fi | |
77 | done | |
78 | if ! $configured; then | |
79 | - echo $"Ignoring guests on $uri URI" | |
80 | + echo "Ignoring guests on $uri URI" | |
81 | continue | |
82 | fi | |
83 | ||
84 | - echo $"Resuming guests on $uri URI..." | |
85 | + echo "Resuming guests on $uri URI..." | |
86 | for guest in $list; do | |
87 | name=$(guest_name $uri $guest) | |
88 | - echo -n $"Resuming guest $name: " | |
89 | + echo -n "Resuming guest $name: " | |
90 | if guest_is_on $uri $guest; then | |
91 | if $guest_running; then | |
92 | - echo $"already active" | |
93 | + echo "already active" | |
94 | else | |
95 | retval run_virsh $uri start "$name" >/dev/null && \ | |
96 | - echo $"done" | |
97 | + echo "done" | |
98 | fi | |
99 | fi | |
100 | done | |
101 | @@ -172,7 +159,7 @@ suspend_guest() | |
102 | guest=$2 | |
103 | ||
104 | name=$(guest_name $uri $guest) | |
105 | - label=$"Suspending $name: " | |
106 | + label="Suspending $name: " | |
107 | echo -n "$label" | |
108 | run_virsh $uri managedsave $guest >/dev/null & | |
109 | virsh_pid=$! | |
110 | @@ -187,7 +174,7 @@ suspend_guest() | |
111 | printf '\r%s%-12s ' "$label" "..." | |
112 | fi | |
113 | done | |
114 | - retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" $"done" | |
115 | + retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" "done" | |
116 | } | |
117 | ||
118 | shutdown_guest() | |
119 | @@ -196,7 +183,7 @@ shutdown_guest() | |
120 | guest=$2 | |
121 | ||
122 | name=$(guest_name $uri $guest) | |
123 | - label=$"Shutting down $name: " | |
124 | + label="Shutting down $name: " | |
125 | echo -n "$label" | |
126 | retval run_virsh $uri shutdown $guest >/dev/null || return | |
127 | timeout=$SHUTDOWN_TIMEOUT | |
128 | @@ -210,9 +197,9 @@ shutdown_guest() | |
129 | ||
130 | if guest_is_on $uri $guest; then | |
131 | if $guest_running; then | |
132 | - printf '\r%s%-12s\n' "$label" $"failed to shutdown in time" | |
133 | + printf '\r%s%-12s\n' "$label" "failed to shutdown in time" | |
134 | else | |
135 | - printf '\r%s%-12s\n' "$label" $"done" | |
136 | + printf '\r%s%-12s\n' "$label" "done" | |
137 | fi | |
138 | fi | |
139 | } | |
140 | @@ -225,7 +212,7 @@ stop() { | |
141 | if [ "x$ON_SHUTDOWN" = xshutdown ]; then | |
142 | suspending=false | |
143 | if [ $SHUTDOWN_TIMEOUT -le 0 ]; then | |
144 | - echo $"Shutdown action requested but SHUTDOWN_TIMEOUT was not set" | |
145 | + echo "Shutdown action requested but SHUTDOWN_TIMEOUT was not set" | |
146 | RETVAL=6 | |
147 | return | |
148 | fi | |
149 | @@ -233,10 +220,10 @@ stop() { | |
150 | ||
151 | : >"$LISTFILE" | |
152 | for uri in $URIS; do | |
153 | - echo -n $"Running guests on $uri URI: " | |
154 | + echo -n "Running guests on $uri URI: " | |
155 | ||
156 | if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then | |
157 | - echo $"libvirtd not installed; skipping this URI." | |
158 | + echo "libvirtd not installed; skipping this URI." | |
159 | continue | |
160 | fi | |
161 | ||
162 | @@ -249,7 +236,7 @@ stop() { | |
163 | empty=false | |
164 | done | |
165 | if $empty; then | |
166 | - echo $"no running guests." | |
167 | + echo "no running guests." | |
168 | else | |
169 | echo | |
170 | echo $uri $list >>"$LISTFILE" | |
171 | @@ -259,9 +246,9 @@ stop() { | |
172 | ||
173 | while read uri list; do | |
174 | if $suspending; then | |
175 | - echo $"Suspending guests on $uri URI..." | |
176 | + echo "Suspending guests on $uri URI..." | |
177 | else | |
178 | - echo $"Shutting down guests on $uri URI..." | |
179 | + echo "Shutting down guests on $uri URI..." | |
180 | fi | |
181 | ||
182 | for guest in $list; do | |
183 | @@ -285,17 +272,16 @@ gueststatus() { | |
184 | ||
185 | # rh_status | |
186 | # Display current status: whether saved state exists, and whether start | |
187 | -# has been executed. We cannot use status() from the functions library, | |
188 | -# since there is no external daemon process matching this init script. | |
189 | +# has been executed. | |
190 | rh_status() { | |
191 | if [ -f "$LISTFILE" ]; then | |
192 | - echo $"stopped, with saved guests" | |
193 | + echo "stopped, with saved guests" | |
194 | RETVAL=3 | |
195 | else | |
196 | if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then | |
197 | - echo $"started" | |
198 | + echo "started" | |
199 | else | |
200 | - echo $"stopped, with no saved guests" | |
201 | + echo "stopped, with no saved guests" | |
202 | fi | |
203 | RETVAL=0 | |
204 | fi | |
205 | @@ -304,7 +290,7 @@ rh_status() { | |
206 | # usage [val] | |
207 | # Display usage string, then exit with VAL (defaults to 2). | |
208 | usage() { | |
209 | - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}" | |
210 | + echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}" | |
211 | exit ${1-2} | |
212 | } | |
213 | ||
214 | diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf | |
215 | index cd58728..53d89bd 100644 | |
216 | --- a/tools/libvirt-guests.sysconf | |
217 | +++ b/tools/libvirt-guests.sysconf | |
218 | @@ -8,7 +8,7 @@ | |
219 | # - ignore libvirt-guests init script won't start any guest on boot, however, | |
220 | # guests marked as autostart will still be automatically started by | |
221 | # libvirtd | |
222 | -#ON_BOOT=start | |
223 | +#ON_BOOT=ignore | |
224 | ||
225 | # action taken on host shutdown | |
226 | # - suspend all running guests are suspended using virsh managedsave | |
227 | @@ -18,7 +18,7 @@ | |
228 | # which just needs a long time to shutdown. When setting | |
229 | # ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a | |
230 | # value suitable for your guests. | |
231 | -#ON_SHUTDOWN=suspend | |
232 | +#ON_SHUTDOWN=shutdown | |
233 | ||
234 | # number of seconds we're willing to wait for a guest to shut down | |
235 | -#SHUTDOWN_TIMEOUT=0 | |
236 | +#SHUTDOWN_TIMEOUT=30 | |
237 | -- |
4 | 4 | 0005-Autodetect-if-the-remote-nc-command-supports-the-q-o.patch |
5 | 5 | 0006-patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch |
6 | 6 | 0007-Disable-CHECKSUM-rule.patch |
7 | 0008-syntax-error-Bad-fd-number-when-stopping-libvirt-gue.patch | |
8 | 0009-Missing-Default-Stop-field-in-LSB-comment-in-libvirt.patch | |
9 | 0010-Debianize-libvirt-guests.patch | |
7 | 0008-Debianize-libvirt-guests.patch |