[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/05: system: Adjust '.bashrc' skeleton for non-interactive SSH session
From: |
Ludovic Courtès |
Subject: |
03/05: system: Adjust '.bashrc' skeleton for non-interactive SSH sessions. |
Date: |
Thu, 12 Mar 2015 20:00:14 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 9a10acc9860d649f4b17c7d84ea685a98ba54b3f
Author: Ludovic Courtès <address@hidden>
Date: Thu Mar 12 19:00:54 2015 +0100
system: Adjust '.bashrc' skeleton for non-interactive SSH sessions.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Source /etc/profile
when in a non-interactive SSH session.
---
gnu/system/shadow.scm | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 4a9580a..4cb8018 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -120,6 +120,18 @@
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
(bashrc (text-file "bashrc" "\
+# Bash initialization for interactive non-login shells and
+# for remote shells (info \"(bash) Bash Startup Files\").
+
+if [ -n \"$SSH_CLIENT\" -a -z \"`type -P cat`\" ]
+then
+ # We are being invoked from a non-interactive SSH session
+ # (as in \"ssh host command\") but 'cat' cannot be found
+ # in $PATH. Source /etc/profile so we get $PATH and other
+ # essential variables.
+ source /etc/profile
+fi
+
PS1='address@hidden \\w\\$ '
alias ls='ls -p --color'
alias ll='ls -l'\n"))
- branch master updated (46ffff9 -> 8c9653b), Ludovic Courtès, 2015/03/12
- 03/05: system: Adjust '.bashrc' skeleton for non-interactive SSH sessions.,
Ludovic Courtès <=
- 05/05: build-system/python: Delay evaluation of the 'python2' package., Ludovic Courtès, 2015/03/12
- 02/05: gnu: Move cflow, Complexity, and GLOBAL to (gnu packages code)., Ludovic Courtès, 2015/03/12
- 01/05: gnu: Add SLOCCount., Ludovic Courtès, 2015/03/12
- 04/05: services: bitlbee: Make /var/lib/bitlbee when activating., Ludovic Courtès, 2015/03/12