ia64/xen-unstable

changeset 8271:77d01909546d

Use xm create's --dryrun option to get the name from the configuration file,
rather than the eversoskanky approach taken previously (use grep, and replace
any occurrences of %d with [0-9]* !)

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Wed Dec 07 16:25:13 2005 +0000 (2005-12-07)
parents 436c3b6d09a6
children b215584242c4
files tools/examples/init.d/xendomains
line diff
     1.1 --- a/tools/examples/init.d/xendomains	Wed Dec 07 15:50:59 2005 +0000
     1.2 +++ b/tools/examples/init.d/xendomains	Wed Dec 07 16:25:13 2005 +0000
     1.3 @@ -152,7 +152,8 @@ contains_something()
     1.4  # read name from xen config file
     1.5  rdname()
     1.6  {
     1.7 -    NM=`grep '^name *=' $1 | sed -e 's/^name *= *"\([^"]*\)".*$/\1/' -e 's/%[id]/[0-9]*/g'`
     1.8 +    NM=$(xm create --quiet --dryrun --defconfig "$1" |
     1.9 +         sed -n 's/^.*(name \(.*\))$/\1/p')
    1.10  }
    1.11  
    1.12  rdnames()
    1.13 @@ -220,6 +221,7 @@ start()
    1.14  		rm $dom
    1.15  	    fi
    1.16  	done
    1.17 +	echo .
    1.18      fi
    1.19  
    1.20      if contains_something "$XENDOMAINS_AUTO"