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)