[Pkg-xen-changes] r996 - trunk/xen/debian

Bastian Blank waldi at alioth.debian.org
Sun Apr 22 21:50:38 UTC 2012


Author: waldi
Date: Sun Apr 22 21:50:37 2012
New Revision: 996

Log:
debian/xen-utils-common.xendomains.init:
Check earlier for already running domain.

Modified:
   trunk/xen/debian/xen-utils-common.xendomains.init

Modified: trunk/xen/debian/xen-utils-common.xendomains.init
==============================================================================
--- trunk/xen/debian/xen-utils-common.xendomains.init	Sun Apr 22 21:43:10 2012	(r995)
+++ trunk/xen/debian/xen-utils-common.xendomains.init	Sun Apr 22 21:50:37 2012	(r996)
@@ -81,7 +81,7 @@
       case "$?" in
         0) 
           rm "$file"
-          domains[name]='started'
+          domains[$name]='started'
           log_action_end_msg 0
           ;;
         *) 
@@ -98,11 +98,15 @@
 {
   for file in $XENDOMAINS_AUTO/*; do
     name="$(check_config_name $file)"
+
+    if [ "${domains[$name]}" = started ] || check_running "$name"; then
+      log_action_msg "Xen domain $name already running"
+      return
+    fi
+
     log_action_begin_msg "Starting Xen domain $name ($file)"
 
-    if check_running "$name"; then
-      log_action_end_msg 0 "already running"
-    elif [ "${domains[$name]}" = failed ]; then
+    if [ "${domains[$name]}" = failed ]; then
       log_action_end_msg 1 "restore failed"
     else
       out=$(xen create --quiet --defconfig "$file" 2>&1 1>/dev/null)



More information about the Pkg-xen-changes mailing list