aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-07-01 22:16:41 +0100
committerKeir Fraser <keir@xensource.com>2007-07-01 22:16:41 +0100
commitcaa6c26fb32d2d040098eb87c51cb3d9e6efebf4 (patch)
tree6204f3b49b5edadb39674b7ab9072ed30fd386f8 /tools
parentc32cff27bab6b78df0ea846bc7ddae3090f3d88a (diff)
downloadxen-caa6c26fb32d2d040098eb87c51cb3d9e6efebf4.tar.gz
xen-caa6c26fb32d2d040098eb87c51cb3d9e6efebf4.tar.bz2
xen-caa6c26fb32d2d040098eb87c51cb3d9e6efebf4.zip
xendomains: Ignore 'lost+found' when finding saved dom images.
Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/examples/init.d/xendomains6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/examples/init.d/xendomains b/tools/examples/init.d/xendomains
index 6ad7a9b9e9..0fffd42c80 100644
--- a/tools/examples/init.d/xendomains
+++ b/tools/examples/init.d/xendomains
@@ -221,11 +221,12 @@ start()
if [ "$XENDOMAINS_RESTORE" = "true" ] &&
contains_something "$XENDOMAINS_SAVE"
then
- mkdir -p $(dirname "$LOCKFILE")
+ XENDOMAINS_SAVED=`/bin/ls $XENDOMAINS_SAVE/* | grep -v 'lost+found'`
+ mkdir -p $(dirname "$LOCKFILE")
touch $LOCKFILE
echo -n "Restoring Xen domains:"
saved_domains=`ls $XENDOMAINS_SAVE`
- for dom in $XENDOMAINS_SAVE/*; do
+ for dom in $XENDOMAINS_SAVED; do
echo -n " ${dom##*/}"
xm restore $dom
if [ $? -ne 0 ]; then
@@ -259,6 +260,7 @@ start()
if [ $? -eq 0 ] || is_running $dom; then
echo -n "(skip)"
else
+ echo "(booting)"
xm create --quiet --defconfig $dom
if [ $? -ne 0 ]; then
rc_failed $?