xendomains stop should stop the domains in the reverse order they were started. If a specific order is desired this can be enforced then (e.g. expect under normal conditions that domain A to be active when domain B is). Reproducible: Always I used the following lines: --- for dom in $(ls "${AUTODIR}/"* 2>/dev/null | sort 2>/dev/null); do for dom in $(ls "${AUTODIR}/"* 2>/dev/null | sort -r 2>/dev/null); do --- in the start(), respectivily, stop() functions instread of --- for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do --- Line in start() function is normally not needed, as underlaying file system or ls already presents the files in sorted order.
Thank you for your bug report. I hope it is fixed with the following commit. Please let me know if it works, or not. *xen-tools-3.3.0 (01 Sep 2008) 01 Sep 2008; Robert Buchholz <rbu@gentoo.org> +files/xen-tools-3.3.0--as-needed.patch, +files/xen-tools-3.3.0-nostrip.patch, +files/xen-tools-3.3.0-xen-detect-nopie-fix.patch, files/xendomains.confd, files/xendomains.initd, metadata.xml, -xen-tools-3.2.0.ebuild, +xen-tools-3.3.0.ebuild: Version bump to Xen 3.3 (bug #201792). Fixes bugs: * Add USE flags for ACM and FLASK Xen Security Modules * Properly compile and uninstall python bytecode * RDEPEND on pyxml (bug #201255) * Remove libvncserver dependency * Shutdown xendomains in reverse start order (bug #210445) * Allow for parallel shutdown of xendomains (bug #162833) * Check that python is built with threading (bug #236092)
As a feedback to your patch: The sort needs to be piped *after* the 2> redirect, otherwise an error is printed if there are no domains in AUTODIR.