]> xenbits.xensource.com Git - xen.git/commitdiff
tools/hotplug: fix bug on xendomains using xl
authorFabio Fantoni <fabio.fantoni@m2r.biz>
Tue, 21 Jan 2014 13:51:08 +0000 (14:51 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 28 Jan 2014 11:18:30 +0000 (11:18 +0000)
Make rdname function work with xl.

The rdname function not support json output of xl commands and this cause
problems using xl, for example the check if domUs are already running (because
they have been restored) on domUs autostart does not succeed and the domain is
created in any case, causing xl create to fail.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/hotplug/Linux/init.d/xendomains

index 38371af6a4bb23e8b1c1d2869ff534e18d1b1e56..59f1e3df4d3bb22e2701596cdde79e4437a2a19d 100644 (file)
@@ -186,7 +186,7 @@ contains_something()
 rdname()
 {
     NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-         sed -n 's/^.*(name \(.*\))$/\1/p')
+         sed -n 's/^.*(name \(.*\))$/\1/p;s/^.*"name": "\(.*\)",$/\1/p')
 }
 
 rdnames()