ia64/xen-unstable

changeset 15462:27e55a7358e2

xendomains: Ignore 'lost+found' when finding saved dom images.
Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>
author Keir Fraser <keir@xensource.com>
date Sun Jul 01 22:16:41 2007 +0100 (2007-07-01)
parents 713bac7cba46
children a3a0202af8a4
files tools/examples/init.d/xendomains
line diff
     1.1 --- a/tools/examples/init.d/xendomains	Sun Jul 01 22:10:38 2007 +0100
     1.2 +++ b/tools/examples/init.d/xendomains	Sun Jul 01 22:16:41 2007 +0100
     1.3 @@ -221,11 +221,12 @@ start()
     1.4      if [ "$XENDOMAINS_RESTORE" = "true" ] &&
     1.5         contains_something "$XENDOMAINS_SAVE"
     1.6      then
     1.7 -        mkdir -p $(dirname "$LOCKFILE")
     1.8 +	XENDOMAINS_SAVED=`/bin/ls $XENDOMAINS_SAVE/* | grep -v 'lost+found'`
     1.9 +	mkdir -p $(dirname "$LOCKFILE")
    1.10  	touch $LOCKFILE
    1.11  	echo -n "Restoring Xen domains:"
    1.12  	saved_domains=`ls $XENDOMAINS_SAVE`
    1.13 -	for dom in $XENDOMAINS_SAVE/*; do
    1.14 +	for dom in $XENDOMAINS_SAVED; do
    1.15  	    echo -n " ${dom##*/}"
    1.16  	    xm restore $dom
    1.17  	    if [ $? -ne 0 ]; then
    1.18 @@ -259,6 +260,7 @@ start()
    1.19  	    if [ $? -eq 0 ] || is_running $dom; then
    1.20  		echo -n "(skip)"
    1.21  	    else
    1.22 +		echo "(booting)"
    1.23  		xm create --quiet --defconfig $dom
    1.24  		if [ $? -ne 0 ]; then
    1.25  		    rc_failed $?