Author: waldi Date: Sun Apr 22 21:40:17 2012 New Revision: 994 Log: debian/xen-utils-common.xendomains.init: Don''t try to start a domain that failed to restore. 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:33:21 2012 (r993) +++ trunk/xen/debian/xen-utils-common.xendomains.init Sun Apr 22 21:40:17 2012 (r994) @@ -75,15 +75,17 @@ for file in $XENDOMAINS_SAVE/*; do if [ -f $file ] ; then name="${file##*/}" - log_action_begin_msg "Restoring Xen domain $name" + log_action_begin_msg "Restoring Xen domain $name ($file)" out=$(xen restore "$file" 2>&1 1>/dev/null) case "$?" in 0) rm "$file" + domains[name]=''started'' log_action_end_msg 0 ;; *) + domains[$name]=''failed'' log_action_end_msg 1 ;; esac @@ -99,6 +101,8 @@ if check_running "$name"; then log_action_end_msg 0 "already running" + elif [ "${domains[$name]}" = failed ]; then + log_action_end_msg 1 "restore failed" else out=$(xen create --quiet --defconfig "$file" 2>&1 1>/dev/null) log_action_end_msg $? @@ -108,6 +112,8 @@ do_start() { + declare -A domains + do_start_restore do_start_auto }