WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Use xm create's --dryrun option to get the name from the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Use xm create's --dryrun option to get the name from the configuration file,
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Dec 2005 19:46:07 +0000
Delivery-date: Wed, 07 Dec 2005 19:46:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 77d01909546d809b94f107dbbb0dd7cd1477181e
# Parent  436c3b6d09a62a837b43a091564c5452112efef5
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@xxxxxxxxxxxxx>

diff -r 436c3b6d09a6 -r 77d01909546d tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains  Wed Dec  7 15:50:59 2005
+++ b/tools/examples/init.d/xendomains  Wed Dec  7 16:25:13 2005
@@ -152,7 +152,8 @@
 # read name from xen config file
 rdname()
 {
-    NM=`grep '^name *=' $1 | sed -e 's/^name *= *"\([^"]*\)".*$/\1/' -e 
's/%[id]/[0-9]*/g'`
+    NM=$(xm create --quiet --dryrun --defconfig "$1" |
+         sed -n 's/^.*(name \(.*\))$/\1/p')
 }
 
 rdnames()
@@ -220,6 +221,7 @@
                rm $dom
            fi
        done
+       echo .
     fi
 
     if contains_something "$XENDOMAINS_AUTO"

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Use xm create's --dryrun option to get the name from the configuration file,, Xen patchbot -unstable <=