]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
hotplug/Linux: xendomains compatibility with xl
authorIan Murray <murrayie@yahoo.co.uk>
Thu, 23 May 2013 10:33:34 +0000 (11:33 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 23 May 2013 10:35:07 +0000 (11:35 +0100)
The xl save file uses a different header string to the xm one. Teach the
xendomains script about it.

Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- rewrote commit message ]

tools/hotplug/Linux/init.d/xendomains

index 2a1999a8b22b735bb45b45e399e7183910565adf..730541ec2eae598bcaa4092fa1fe8a92c05c83bb 100644 (file)
 . /etc/xen/scripts/hotplugpath.sh
 
 CMD=${SBINDIR}/xm
+HEADCOMP="LinuxGuestRecord"
 $CMD list &> /dev/null
 if test $? -ne 0
 then
        CMD=${SBINDIR}/xl
+       HEADCOMP="Xen saved domain"
 fi
 
 $CMD list &> /dev/null
@@ -257,7 +259,7 @@ start()
         for dom in $XENDOMAINS_SAVE/*; do
             if [ -f $dom ] ; then
                 HEADER=`head -c 16 $dom | head -n 1 2> /dev/null`
-                if [ $HEADER = "LinuxGuestRecord" ]; then
+                if [ "$HEADER" = "$HEADCOMP" ]; then
                     echo -n " ${dom##*/}"
                     XMR=`$CMD restore $dom 2>&1 1>/dev/null`
                     #$CMD restore $dom