GNU bug report logs -
#29035
.bashrc updates
Previous Next
Reported by: Marius Bakke <mbakke <at> fastmail.com>
Date: Fri, 27 Oct 2017 23:51:02 UTC
Severity: normal
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 29035 <at> debbugs.gnu.org (full text, mbox):
* gnu/system/shadow.scm (default-skeletons): Instead of testing for
$SSH_CLIENT, check whether '$-' includes the letter 'i'.
---
gnu/system/shadow.scm | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 236807c70..475960b89 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -157,12 +157,11 @@ if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
# honor it and otherwise use /bin/sh.
export SHELL
-if [ -n \"$SSH_CLIENT\" -a -z \"`type -P cat`\" ]
+if [[ $- != *i* ]]
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.
+ # (as in \"ssh host command\"). Source /etc/profile so we
+ # get $PATH and other essential variables.
source /etc/profile
fi
--
2.14.3
This bug report was last modified 7 years and 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.