<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>I tried it without the quotes first, but lxc-attach thinks -i is an option for lxc-attach not the command I'm trying to execute.</div>
<div><br></div><div><br></div><div>Usage: lxc-attach --name=NAME</div><div><br></div><div>Execute the specified command - enter the container NAME</div><div><br></div><div>Options :</div><div> -n, --name=NAME NAME for name of the container</div>
<div><br></div><div>Common options :</div><div> -o, --logfile=FILE Output log to FILE instead of stderr</div><div> -l, --logpriority=LEVEL Set log priority to LEVEL</div><div> -q, --quiet Don't produce any output</div>
<div> -?, --help Give this help list</div><div> --usage Give a short usage message</div><div><br></div><div>Mandatory or optional arguments to long options are also mandatory or optional</div>
<div>for any corresponding short options.</div><div><br></div><div>See the lxc-attach man page for further information.</div></span><br><div class="gmail_quote">On Tue, Nov 16, 2010 at 1:33 PM, Daniel Lezcano <span dir="ltr"><<a href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 11/16/2010 12:41 PM, Goran Cetusic wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
After successfully patching the 2.6.35.8 kernel with<br>
<a href="http://lxc.sourceforge.net/patches/linux/2.6.35/2.6.35-lxc1/" target="_blank">http://lxc.sourceforge.net/patches/linux/2.6.35/2.6.35-lxc1/</a> I finally<br>
managed to attach to a container shell.<br>
Everything seems to be working, except I have no idea how to run a command<br>
with options.<br>
One of the programs I need to run is tcpdump<br>
<br>
lxc-attach -n n0 "/usr/sbin/tcpdump -i eth0"<br>
<br>
</blockquote>
<br></div>
Did you try without the quotes ?<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Running tcpdump without the options works fine.<br>
But with options I get the following error<br>
<br>
lxc-attach: No such file or directory - failed to exec '/usr/sbin/tcpdump -i<br>
eth0'<br>
<br>
I have no idea if it's the code not supporting options or just me.<br>
Also, are there plans to implement the lxc-attach functionality in the<br>
kernel?<br>
<br>
</blockquote>
<br></div>
Yep, it's on the way, it should be merged soon.<br>
</blockquote></div><br>