From: Fabio Fantoni Date: Tue, 21 Jan 2014 13:51:08 +0000 (+0100) Subject: tools/hotplug: fix bug on xendomains using xl X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5647 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d3b483f9776fbae19a2354a2a3c81536fcbdd37a;p=xen.git tools/hotplug: fix bug on xendomains using xl 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 Acked-by: Ian Campbell --- diff --git a/tools/hotplug/Linux/init.d/xendomains b/tools/hotplug/Linux/init.d/xendomains index 38371af6a4..59f1e3df4d 100644 --- a/tools/hotplug/Linux/init.d/xendomains +++ b/tools/hotplug/Linux/init.d/xendomains @@ -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()