[pve-devel] [PATCH docs] pvecm: document modified .bashrc case for ssh

Oguz Bektas o.bektas at proxmox.com
Thu Nov 12 17:39:44 CET 2020


use the snippet from /etc/skel/.bashrc for checking
if session is interactive, if non-interactive return
and do nothing.

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 pvecm.adoc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/pvecm.adoc b/pvecm.adoc
index 3820c17..f7abfcd 100644
--- a/pvecm.adoc
+++ b/pvecm.adoc
@@ -171,6 +171,19 @@ since guest IDs could be conflicting. As a workaround create a backup of the
 guest (`vzdump`) and restore it as a different ID after the node has been added
 to the cluster.
 
+IMPORTANT: SSH is used for inter-node communications through tunneling. If you
+have a custom `.bashrc` or similar file, this would get executed during some API
+calls. To avoid such complications, you can add the following snippet to `/root/.bashrc`
+at the beginning of the file:
+
+----
+# If not running interactively, don't do anything
+case $- in
+    *i*) ;;
+      *) return;;
+esac
+----
+
 Join Node to Cluster via GUI
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
2.20.1





More information about the pve-devel mailing list