[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lxc-devel
Subject:    [lxc-devel] [lxd/master] Added documentation about shell env to lxc exec
From:       cebe on Github <lxc-bot () linuxcontainers ! org>
Date:       2017-11-30 10:23:05
Message-ID: 20171130102305.98A661E439 () mailman01 ! srv ! dcmtl ! stgraber ! net
[Download RAW message or body]

[Attachment #2 (text/x-mailbox)]

The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4065

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
See https://github.com/lxc/lxd/issues/3054#issuecomment-347925994

This probably needs to be adjusted in the i18n translation files, but I have no idea how that works.

[Attachment #3 (text/plain)]

From 3d96cbcebcb24c92df87147e173f423488b34712 Mon Sep 17 00:00:00 2001
From: Carsten Brandt <mail@cebe.cc>
Date: Thu, 30 Nov 2017 11:21:01 +0100
Subject: [PATCH] Added documentation about shell env to lxc exec

See https://github.com/lxc/lxd/issues/3054#issuecomment-347925994
---
 lxc/exec.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lxc/exec.go b/lxc/exec.go
index 5422b9056..b0865444b 100644
--- a/lxc/exec.go
+++ b/lxc/exec.go
@@ -55,6 +55,12 @@ func (c *execCmd) usage() string {
 
 Execute commands in containers.
 
+The command is executed directly using exec, so there is no shell and shell patterns \
(variables, file redirects, ...) +won't be understood. If you need a shell \
environment you need to execute the shell executeable, passing the shell commands +as \
arguments, for example: +
+    lxc exec <container> -- sh -c "cd /tmp && pwd"
+
 Mode defaults to non-interactive, interactive mode is selected if both stdin AND \
stdout are terminals (stderr is ignored).`)  }
 


[Attachment #4 (text/plain)]

_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic