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-users

Re: [Xen-users] Re: execute command

To: Anand <xen.mails@xxxxxxxxx>
Subject: Re: [Xen-users] Re: execute command
From: Charles Duffy <cduffy@xxxxxxxxxxx>
Date: Thu, 05 Jan 2006 15:19:10 -0600
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Jan 2006 21:23:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <acb757c00601051302u62b09525y7c53018589976fbf@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <acb757c00601051247h299c7346ga05627894123b272@xxxxxxxxxxxxxx> <dpk19q$l0$1@xxxxxxxxxxxxx> <acb757c00601051302u62b09525y7c53018589976fbf@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Thunderbird/1.5 Mnenhy/0.7.3.0
Anand wrote:
> Any ideas on how to implement such a script ? I tried echo "command;
> exit" | xm console vm01 however it doesn't work.
Use expect, as I was suggesting. Even if piping into "xm console"'s
stdin worked as you're suggesting, exiting the shell that's logged in
within a console session isn't going to exit the console session itself,
so that's an obviously bogus approach. Why aren't you going the ssh/rsh
route?

See http://expect.nist.gov/ -- or, if you're more pythonically inclined,
http://pexpect.sourceforge.net/. Expect to do some programming.

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