[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.8.6-1-17-g904de70
Laurent Léonard
laurent at open-minds.org
Tue Jan 18 09:23:04 UTC 2011
The following commit has been merged in the experimental branch:
commit ee3d2e0b51a4709d2a0af4a04a9ee5aa0c16385f
Author: Laurent Léonard <laurent at open-minds.org>
Date: Mon Jan 17 19:09:37 2011 +0100
Update patch 0010-Debianize-libvirt-guests.patch
diff --git a/debian/patches/0010-Debianize-libvirt-guests.patch b/debian/patches/0010-Debianize-libvirt-guests.patch
index 9ce45b1..ce33869 100644
--- a/debian/patches/0010-Debianize-libvirt-guests.patch
+++ b/debian/patches/0010-Debianize-libvirt-guests.patch
@@ -4,14 +4,14 @@ Subject: [PATCH] Debianize libvirt-guests
Origin: vendor
---
- tools/libvirt-guests.init.in | 79 +++++++++++++++++-------------------------
+ tools/libvirt-guests.init.sh | 43 +++++++++++++----------------------------
tools/libvirt-guests.sysconf | 6 ++--
- 2 files changed, 35 insertions(+), 50 deletions(-)
+ 2 files changed, 17 insertions(+), 32 deletions(-)
-diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in
-index e28938d..0fe82fb 100644
---- a/tools/libvirt-guests.init.in
-+++ b/tools/libvirt-guests.init.in
+diff --git a/tools/libvirt-guests.init.sh b/tools/libvirt-guests.init.sh
+index 8823d06..7480c32 100644
+--- a/tools/libvirt-guests.init.sh
++++ b/tools/libvirt-guests.init.sh
@@ -4,8 +4,8 @@
#
### BEGIN INIT INFO
@@ -23,7 +23,7 @@ index e28938d..0fe82fb 100644
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: suspend/resume libvirt guests on shutdown/boot
-@@ -14,33 +14,19 @@
+@@ -14,40 +14,26 @@
# See http://libvirt.org
### END INIT INFO
@@ -37,17 +37,25 @@ index e28938d..0fe82fb 100644
-# See http://libvirt.org
-#
-
--sysconfdir=@sysconfdir@
--localstatedir=@localstatedir@
--libvirtd=@sbindir@/libvirtd
+-sysconfdir="@sysconfdir@"
+-localstatedir="@localstatedir@"
+-libvirtd="@sbindir@"/libvirtd
-
-# Source function library.
-test ! -r "$sysconfdir"/rc.d/init.d/functions ||
-- . "$sysconfdir"/rc.d/init.d/functions
+- . "$sysconfdir"/rc.d/init.d/functions
+sysconfdir=/etc
+localstatedir=/var
+libvirtd=/usr/sbin/libvirtd
+ # Source gettext library.
+ # Make sure this file is recognized as having translations: _("dummy")
+-. "@bindir@"/gettext.sh
++. /usr/bin/gettext.sh
+
+-export TEXTDOMAIN="@PACKAGE@" TEXTDOMAINDIR="@localedir@"
++export TEXTDOMAIN="libvirt" TEXTDOMAINDIR="/usr/share/locale"
+
URIS=default
-ON_BOOT=start
-ON_SHUTDOWN=suspend
@@ -56,8 +64,10 @@ index e28938d..0fe82fb 100644
+ON_SHUTDOWN=shutdown
+SHUTDOWN_TIMEOUT=30
--test -f "$sysconfdir"/sysconfig/libvirt-guests && . "$sysconfdir"/sysconfig/libvirt-guests
-+test -f "$sysconfdir"/default/libvirt-guests && . "$sysconfdir"/default/libvirt-guests
+-test -f "$sysconfdir"/sysconfig/libvirt-guests &&
+- . "$sysconfdir"/sysconfig/libvirt-guests
++test -f "$sysconfdir"/default/libvirt-guests &&
++ . "$sysconfdir"/default/libvirt-guests
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
-VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
@@ -65,124 +75,7 @@ index e28938d..0fe82fb 100644
RETVAL=0
-@@ -129,7 +115,7 @@ start() {
- [ -f "$LISTFILE" ] || { started; return 0; }
-
- if [ "x$ON_BOOT" != xstart ]; then
-- echo $"libvirt-guests is configured not to start any guests on boot"
-+ echo "libvirt-guests is configured not to start any guests on boot"
- rm -f "$LISTFILE"
- started
- return 0
-@@ -144,20 +130,20 @@ start() {
- fi
- done
- if ! $configured; then
-- echo $"Ignoring guests on $uri URI"
-+ echo "Ignoring guests on $uri URI"
- continue
- fi
-
-- echo $"Resuming guests on $uri URI..."
-+ echo "Resuming guests on $uri URI..."
- for guest in $list; do
- name=$(guest_name $uri $guest)
-- echo -n $"Resuming guest $name: "
-+ echo -n "Resuming guest $name: "
- if guest_is_on $uri $guest; then
- if $guest_running; then
-- echo $"already active"
-+ echo "already active"
- else
- retval run_virsh $uri start "$name" >/dev/null && \
-- echo $"done"
-+ echo "done"
- fi
- fi
- done
-@@ -173,7 +159,7 @@ suspend_guest()
- guest=$2
-
- name=$(guest_name $uri $guest)
-- label=$"Suspending $name: "
-+ label="Suspending $name: "
- echo -n "$label"
- run_virsh $uri managedsave $guest >/dev/null &
- virsh_pid=$!
-@@ -188,7 +174,7 @@ suspend_guest()
- printf '\r%s%-12s ' "$label" "..."
- fi
- done
-- retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" $"done"
-+ retval wait $virsh_pid && printf '\r%s%-12s\n' "$label" "done"
- }
-
- shutdown_guest()
-@@ -197,7 +183,7 @@ shutdown_guest()
- guest=$2
-
- name=$(guest_name $uri $guest)
-- label=$"Shutting down $name: "
-+ label="Shutting down $name: "
- echo -n "$label"
- retval run_virsh $uri shutdown $guest >/dev/null || return
- timeout=$SHUTDOWN_TIMEOUT
-@@ -211,9 +197,9 @@ shutdown_guest()
-
- if guest_is_on $uri $guest; then
- if $guest_running; then
-- printf '\r%s%-12s\n' "$label" $"failed to shutdown in time"
-+ printf '\r%s%-12s\n' "$label" "failed to shutdown in time"
- else
-- printf '\r%s%-12s\n' "$label" $"done"
-+ printf '\r%s%-12s\n' "$label" "done"
- fi
- fi
- }
-@@ -226,7 +212,7 @@ stop() {
- if [ "x$ON_SHUTDOWN" = xshutdown ]; then
- suspending=false
- if [ $SHUTDOWN_TIMEOUT -le 0 ]; then
-- echo $"Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
-+ echo "Shutdown action requested but SHUTDOWN_TIMEOUT was not set"
- RETVAL=6
- return
- fi
-@@ -234,10 +220,10 @@ stop() {
-
- : >"$LISTFILE"
- for uri in $URIS; do
-- echo -n $"Running guests on $uri URI: "
-+ echo -n "Running guests on $uri URI: "
-
- if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
-- echo $"libvirtd not installed; skipping this URI."
-+ echo "libvirtd not installed; skipping this URI."
- continue
- fi
-
-@@ -250,7 +236,7 @@ stop() {
- empty=false
- done
- if $empty; then
-- echo $"no running guests."
-+ echo "no running guests."
- else
- echo
- echo $uri $list >>"$LISTFILE"
-@@ -260,9 +246,9 @@ stop() {
-
- while read uri list; do
- if $suspending; then
-- echo $"Suspending guests on $uri URI..."
-+ echo "Suspending guests on $uri URI..."
- else
-- echo $"Shutting down guests on $uri URI..."
-+ echo "Shutting down guests on $uri URI..."
- fi
-
- for guest in $list; do
-@@ -286,17 +272,16 @@ gueststatus() {
+@@ -296,8 +282,7 @@ gueststatus() {
# rh_status
# Display current status: whether saved state exists, and whether start
@@ -191,28 +84,7 @@ index e28938d..0fe82fb 100644
+# has been executed.
rh_status() {
if [ -f "$LISTFILE" ]; then
-- echo $"stopped, with saved guests"
-+ echo "stopped, with saved guests"
- RETVAL=3
- else
- if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then
-- echo $"started"
-+ echo "started"
- else
-- echo $"stopped, with no saved guests"
-+ echo "stopped, with no saved guests"
- fi
- RETVAL=0
- fi
-@@ -305,7 +290,7 @@ rh_status() {
- # usage [val]
- # Display usage string, then exit with VAL (defaults to 2).
- usage() {
-- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"
-+ echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"
- exit ${1-2}
- }
-
+ gettext "stopped, with saved guests"; echo
diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
index cd58728..53d89bd 100644
--- a/tools/libvirt-guests.sysconf
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list